From 5ec6074f0633939fd17d94111d10c6c6b062978c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 11:49:36 +0200 Subject: Adding upstream version 1:2.30.2. Signed-off-by: Daniel Baumann --- t/t4018/README | 18 ++++++++++++++++++ t/t4018/bash-arithmetic-function | 4 ++++ t/t4018/bash-bashism-style-compact | 6 ++++++ t/t4018/bash-bashism-style-function | 4 ++++ t/t4018/bash-bashism-style-whitespace | 4 ++++ t/t4018/bash-conditional-function | 4 ++++ t/t4018/bash-missing-parentheses | 6 ++++++ t/t4018/bash-mixed-style-compact | 4 ++++ t/t4018/bash-mixed-style-function | 4 ++++ t/t4018/bash-nested-functions | 6 ++++++ t/t4018/bash-other-characters | 4 ++++ t/t4018/bash-posix-style-compact | 4 ++++ t/t4018/bash-posix-style-function | 4 ++++ t/t4018/bash-posix-style-whitespace | 4 ++++ t/t4018/bash-subshell-function | 4 ++++ t/t4018/bash-trailing-comment | 4 ++++ t/t4018/cpp-c++-function | 4 ++++ t/t4018/cpp-class-constructor | 4 ++++ t/t4018/cpp-class-constructor-mem-init | 5 +++++ t/t4018/cpp-class-definition | 4 ++++ t/t4018/cpp-class-definition-derived | 5 +++++ t/t4018/cpp-class-destructor | 4 ++++ t/t4018/cpp-function-returning-global-type | 4 ++++ t/t4018/cpp-function-returning-nested | 5 +++++ t/t4018/cpp-function-returning-pointer | 4 ++++ t/t4018/cpp-function-returning-reference | 4 ++++ t/t4018/cpp-gnu-style-function | 5 +++++ t/t4018/cpp-namespace-definition | 4 ++++ t/t4018/cpp-operator-definition | 4 ++++ t/t4018/cpp-skip-access-specifiers | 8 ++++++++ t/t4018/cpp-skip-comment-block | 9 +++++++++ t/t4018/cpp-skip-labels | 8 ++++++++ t/t4018/cpp-struct-definition | 9 +++++++++ t/t4018/cpp-struct-single-line | 7 +++++++ t/t4018/cpp-template-function-definition | 4 ++++ t/t4018/cpp-union-definition | 4 ++++ t/t4018/cpp-void-c-function | 4 ++++ t/t4018/css-attribute-value-selector | 4 ++++ t/t4018/css-block-level-@-statements | 10 ++++++++++ t/t4018/css-brace-in-col-1 | 5 +++++ t/t4018/css-class-selector | 4 ++++ t/t4018/css-colon-eol | 4 ++++ t/t4018/css-colon-selector | 5 +++++ t/t4018/css-common | 4 ++++ t/t4018/css-id-selector | 4 ++++ t/t4018/css-long-selector-list | 6 ++++++ t/t4018/css-prop-sans-indent | 5 +++++ t/t4018/css-root-selector | 4 ++++ t/t4018/css-short-selector-list | 4 ++++ t/t4018/css-trailing-space | 5 +++++ t/t4018/custom1-pattern | 17 +++++++++++++++++ t/t4018/custom2-match-to-end-of-line | 8 ++++++++ t/t4018/custom3-alternation-in-pattern | 17 +++++++++++++++++ t/t4018/dts-labels | 9 +++++++++ t/t4018/dts-node-unitless | 8 ++++++++ t/t4018/dts-nodes | 8 ++++++++ t/t4018/dts-nodes-boolean-prop | 9 +++++++++ t/t4018/dts-nodes-comment1 | 8 ++++++++ t/t4018/dts-nodes-comment2 | 8 ++++++++ t/t4018/dts-nodes-multiline-prop | 13 +++++++++++++ t/t4018/dts-reference | 9 +++++++++ t/t4018/dts-root | 5 +++++ t/t4018/dts-root-comment | 8 ++++++++ t/t4018/elixir-do-not-pick-end | 5 +++++ t/t4018/elixir-ex-unit-test | 6 ++++++ t/t4018/elixir-function | 5 +++++ t/t4018/elixir-macro | 5 +++++ t/t4018/elixir-module | 9 +++++++++ t/t4018/elixir-module-func | 8 ++++++++ t/t4018/elixir-nested-module | 9 +++++++++ t/t4018/elixir-private-function | 5 +++++ t/t4018/elixir-protocol | 6 ++++++ t/t4018/elixir-protocol-implementation | 5 +++++ t/t4018/fortran-block-data | 5 +++++ t/t4018/fortran-comment | 13 +++++++++++++ t/t4018/fortran-comment-keyword | 14 ++++++++++++++ t/t4018/fortran-comment-legacy | 13 +++++++++++++ t/t4018/fortran-comment-legacy-star | 13 +++++++++++++ t/t4018/fortran-external-function | 9 +++++++++ t/t4018/fortran-external-subroutine | 5 +++++ t/t4018/fortran-module | 5 +++++ t/t4018/fortran-module-procedure | 13 +++++++++++++ t/t4018/fortran-program | 5 +++++ t/t4018/fountain-scene | 4 ++++ t/t4018/golang-complex-function | 8 ++++++++ t/t4018/golang-func | 4 ++++ t/t4018/golang-interface | 4 ++++ t/t4018/golang-long-func | 5 +++++ t/t4018/golang-struct | 4 ++++ t/t4018/java-class-member-function | 8 ++++++++ t/t4018/markdown-heading-indented | 6 ++++++ t/t4018/markdown-heading-non-headings | 17 +++++++++++++++++ t/t4018/matlab-class-definition | 5 +++++ t/t4018/matlab-function | 4 ++++ t/t4018/matlab-octave-section-1 | 3 +++ t/t4018/matlab-octave-section-2 | 3 +++ t/t4018/matlab-section | 3 +++ t/t4018/perl-skip-end-of-heredoc | 8 ++++++++ t/t4018/perl-skip-forward-decl | 10 ++++++++++ t/t4018/perl-skip-sub-in-pod | 18 ++++++++++++++++++ t/t4018/perl-sub-definition | 4 ++++ t/t4018/perl-sub-definition-kr-brace | 4 ++++ t/t4018/php-abstract-class | 4 ++++ t/t4018/php-abstract-method | 7 +++++++ t/t4018/php-class | 4 ++++ t/t4018/php-final-class | 4 ++++ t/t4018/php-final-method | 7 +++++++ t/t4018/php-function | 4 ++++ t/t4018/php-interface | 4 ++++ t/t4018/php-method | 7 +++++++ t/t4018/php-trait | 7 +++++++ t/t4018/python-async-def | 4 ++++ t/t4018/python-class | 4 ++++ t/t4018/python-def | 4 ++++ t/t4018/python-indented-async-def | 7 +++++++ t/t4018/python-indented-class | 5 +++++ t/t4018/python-indented-def | 7 +++++++ t/t4018/rust-fn | 5 +++++ t/t4018/rust-impl | 5 +++++ t/t4018/rust-macro-rules | 6 ++++++ t/t4018/rust-struct | 5 +++++ t/t4018/rust-trait | 5 +++++ 122 files changed, 769 insertions(+) create mode 100644 t/t4018/README create mode 100644 t/t4018/bash-arithmetic-function create mode 100644 t/t4018/bash-bashism-style-compact create mode 100644 t/t4018/bash-bashism-style-function create mode 100644 t/t4018/bash-bashism-style-whitespace create mode 100644 t/t4018/bash-conditional-function create mode 100644 t/t4018/bash-missing-parentheses create mode 100644 t/t4018/bash-mixed-style-compact create mode 100644 t/t4018/bash-mixed-style-function create mode 100644 t/t4018/bash-nested-functions create mode 100644 t/t4018/bash-other-characters create mode 100644 t/t4018/bash-posix-style-compact create mode 100644 t/t4018/bash-posix-style-function create mode 100644 t/t4018/bash-posix-style-whitespace create mode 100644 t/t4018/bash-subshell-function create mode 100644 t/t4018/bash-trailing-comment create mode 100644 t/t4018/cpp-c++-function create mode 100644 t/t4018/cpp-class-constructor create mode 100644 t/t4018/cpp-class-constructor-mem-init create mode 100644 t/t4018/cpp-class-definition create mode 100644 t/t4018/cpp-class-definition-derived create mode 100644 t/t4018/cpp-class-destructor create mode 100644 t/t4018/cpp-function-returning-global-type create mode 100644 t/t4018/cpp-function-returning-nested create mode 100644 t/t4018/cpp-function-returning-pointer create mode 100644 t/t4018/cpp-function-returning-reference create mode 100644 t/t4018/cpp-gnu-style-function create mode 100644 t/t4018/cpp-namespace-definition create mode 100644 t/t4018/cpp-operator-definition create mode 100644 t/t4018/cpp-skip-access-specifiers create mode 100644 t/t4018/cpp-skip-comment-block create mode 100644 t/t4018/cpp-skip-labels create mode 100644 t/t4018/cpp-struct-definition create mode 100644 t/t4018/cpp-struct-single-line create mode 100644 t/t4018/cpp-template-function-definition create mode 100644 t/t4018/cpp-union-definition create mode 100644 t/t4018/cpp-void-c-function create mode 100644 t/t4018/css-attribute-value-selector create mode 100644 t/t4018/css-block-level-@-statements create mode 100644 t/t4018/css-brace-in-col-1 create mode 100644 t/t4018/css-class-selector create mode 100644 t/t4018/css-colon-eol create mode 100644 t/t4018/css-colon-selector create mode 100644 t/t4018/css-common create mode 100644 t/t4018/css-id-selector create mode 100644 t/t4018/css-long-selector-list create mode 100644 t/t4018/css-prop-sans-indent create mode 100644 t/t4018/css-root-selector create mode 100644 t/t4018/css-short-selector-list create mode 100644 t/t4018/css-trailing-space create mode 100644 t/t4018/custom1-pattern create mode 100644 t/t4018/custom2-match-to-end-of-line create mode 100644 t/t4018/custom3-alternation-in-pattern create mode 100644 t/t4018/dts-labels create mode 100644 t/t4018/dts-node-unitless create mode 100644 t/t4018/dts-nodes create mode 100644 t/t4018/dts-nodes-boolean-prop create mode 100644 t/t4018/dts-nodes-comment1 create mode 100644 t/t4018/dts-nodes-comment2 create mode 100644 t/t4018/dts-nodes-multiline-prop create mode 100644 t/t4018/dts-reference create mode 100644 t/t4018/dts-root create mode 100644 t/t4018/dts-root-comment create mode 100644 t/t4018/elixir-do-not-pick-end create mode 100644 t/t4018/elixir-ex-unit-test create mode 100644 t/t4018/elixir-function create mode 100644 t/t4018/elixir-macro create mode 100644 t/t4018/elixir-module create mode 100644 t/t4018/elixir-module-func create mode 100644 t/t4018/elixir-nested-module create mode 100644 t/t4018/elixir-private-function create mode 100644 t/t4018/elixir-protocol create mode 100644 t/t4018/elixir-protocol-implementation create mode 100644 t/t4018/fortran-block-data create mode 100644 t/t4018/fortran-comment create mode 100644 t/t4018/fortran-comment-keyword create mode 100644 t/t4018/fortran-comment-legacy create mode 100644 t/t4018/fortran-comment-legacy-star create mode 100644 t/t4018/fortran-external-function create mode 100644 t/t4018/fortran-external-subroutine create mode 100644 t/t4018/fortran-module create mode 100644 t/t4018/fortran-module-procedure create mode 100644 t/t4018/fortran-program create mode 100644 t/t4018/fountain-scene create mode 100644 t/t4018/golang-complex-function create mode 100644 t/t4018/golang-func create mode 100644 t/t4018/golang-interface create mode 100644 t/t4018/golang-long-func create mode 100644 t/t4018/golang-struct create mode 100644 t/t4018/java-class-member-function create mode 100644 t/t4018/markdown-heading-indented create mode 100644 t/t4018/markdown-heading-non-headings create mode 100644 t/t4018/matlab-class-definition create mode 100644 t/t4018/matlab-function create mode 100644 t/t4018/matlab-octave-section-1 create mode 100644 t/t4018/matlab-octave-section-2 create mode 100644 t/t4018/matlab-section create mode 100644 t/t4018/perl-skip-end-of-heredoc create mode 100644 t/t4018/perl-skip-forward-decl create mode 100644 t/t4018/perl-skip-sub-in-pod create mode 100644 t/t4018/perl-sub-definition create mode 100644 t/t4018/perl-sub-definition-kr-brace create mode 100644 t/t4018/php-abstract-class create mode 100644 t/t4018/php-abstract-method create mode 100644 t/t4018/php-class create mode 100644 t/t4018/php-final-class create mode 100644 t/t4018/php-final-method create mode 100644 t/t4018/php-function create mode 100644 t/t4018/php-interface create mode 100644 t/t4018/php-method create mode 100644 t/t4018/php-trait create mode 100644 t/t4018/python-async-def create mode 100644 t/t4018/python-class create mode 100644 t/t4018/python-def create mode 100644 t/t4018/python-indented-async-def create mode 100644 t/t4018/python-indented-class create mode 100644 t/t4018/python-indented-def create mode 100644 t/t4018/rust-fn create mode 100644 t/t4018/rust-impl create mode 100644 t/t4018/rust-macro-rules create mode 100644 t/t4018/rust-struct create mode 100644 t/t4018/rust-trait (limited to 't/t4018') diff --git a/t/t4018/README b/t/t4018/README new file mode 100644 index 0000000..283e01c --- /dev/null +++ b/t/t4018/README @@ -0,0 +1,18 @@ +How to write RIGHT test cases +============================= + +Insert the word "ChangeMe" (exactly this form) at a distance of +at least two lines from the line that must appear in the hunk header. + +The text that must appear in the hunk header must contain the word +"right", but in all upper-case, like in the title above. + +To mark a test case that highlights a malfunction, insert the word +BROKEN in all lower-case somewhere in the file. + +This text is a bit twisted and out of order, but it is itself a +test case for the default hunk header pattern. Know what you are doing +if you change it. + +BTW, this tests that the head line goes to the hunk header, not the line +of equal signs. diff --git a/t/t4018/bash-arithmetic-function b/t/t4018/bash-arithmetic-function new file mode 100644 index 0000000..c0b276c --- /dev/null +++ b/t/t4018/bash-arithmetic-function @@ -0,0 +1,4 @@ +RIGHT() (( + + ChangeMe = "$x" + "$y" +)) diff --git a/t/t4018/bash-bashism-style-compact b/t/t4018/bash-bashism-style-compact new file mode 100644 index 0000000..1ca3126 --- /dev/null +++ b/t/t4018/bash-bashism-style-compact @@ -0,0 +1,6 @@ +function RIGHT { + function InvalidSyntax{ + : + echo 'ChangeMe' + } +} diff --git a/t/t4018/bash-bashism-style-function b/t/t4018/bash-bashism-style-function new file mode 100644 index 0000000..f1de4fa --- /dev/null +++ b/t/t4018/bash-bashism-style-function @@ -0,0 +1,4 @@ +function RIGHT { + : + echo 'ChangeMe' +} diff --git a/t/t4018/bash-bashism-style-whitespace b/t/t4018/bash-bashism-style-whitespace new file mode 100644 index 0000000..ade85dd --- /dev/null +++ b/t/t4018/bash-bashism-style-whitespace @@ -0,0 +1,4 @@ + function RIGHT ( ) { + + ChangeMe + } diff --git a/t/t4018/bash-conditional-function b/t/t4018/bash-conditional-function new file mode 100644 index 0000000..c5949e8 --- /dev/null +++ b/t/t4018/bash-conditional-function @@ -0,0 +1,4 @@ +RIGHT() [[ \ + + "$a" > "$ChangeMe" +]] diff --git a/t/t4018/bash-missing-parentheses b/t/t4018/bash-missing-parentheses new file mode 100644 index 0000000..8c8a05d --- /dev/null +++ b/t/t4018/bash-missing-parentheses @@ -0,0 +1,6 @@ +function RIGHT { + functionInvalidSyntax { + : + echo 'ChangeMe' + } +} diff --git a/t/t4018/bash-mixed-style-compact b/t/t4018/bash-mixed-style-compact new file mode 100644 index 0000000..d9364cb --- /dev/null +++ b/t/t4018/bash-mixed-style-compact @@ -0,0 +1,4 @@ +function RIGHT(){ + : + echo 'ChangeMe' +} diff --git a/t/t4018/bash-mixed-style-function b/t/t4018/bash-mixed-style-function new file mode 100644 index 0000000..555f9b2 --- /dev/null +++ b/t/t4018/bash-mixed-style-function @@ -0,0 +1,4 @@ +function RIGHT() { + + ChangeMe +} diff --git a/t/t4018/bash-nested-functions b/t/t4018/bash-nested-functions new file mode 100644 index 0000000..2c9237e --- /dev/null +++ b/t/t4018/bash-nested-functions @@ -0,0 +1,6 @@ +outer() { + RIGHT() { + : + echo 'ChangeMe' + } +} diff --git a/t/t4018/bash-other-characters b/t/t4018/bash-other-characters new file mode 100644 index 0000000..a3f390d --- /dev/null +++ b/t/t4018/bash-other-characters @@ -0,0 +1,4 @@ +_RIGHT_0n() { + + ChangeMe +} diff --git a/t/t4018/bash-posix-style-compact b/t/t4018/bash-posix-style-compact new file mode 100644 index 0000000..045bd20 --- /dev/null +++ b/t/t4018/bash-posix-style-compact @@ -0,0 +1,4 @@ +RIGHT(){ + + ChangeMe +} diff --git a/t/t4018/bash-posix-style-function b/t/t4018/bash-posix-style-function new file mode 100644 index 0000000..a4d1448 --- /dev/null +++ b/t/t4018/bash-posix-style-function @@ -0,0 +1,4 @@ +RIGHT() { + + ChangeMe +} diff --git a/t/t4018/bash-posix-style-whitespace b/t/t4018/bash-posix-style-whitespace new file mode 100644 index 0000000..4d984f0 --- /dev/null +++ b/t/t4018/bash-posix-style-whitespace @@ -0,0 +1,4 @@ + RIGHT ( ) { + + ChangeMe + } diff --git a/t/t4018/bash-subshell-function b/t/t4018/bash-subshell-function new file mode 100644 index 0000000..80baa09 --- /dev/null +++ b/t/t4018/bash-subshell-function @@ -0,0 +1,4 @@ +RIGHT() ( + + ChangeMe=2 +) diff --git a/t/t4018/bash-trailing-comment b/t/t4018/bash-trailing-comment new file mode 100644 index 0000000..f1edbed --- /dev/null +++ b/t/t4018/bash-trailing-comment @@ -0,0 +1,4 @@ +RIGHT() { # Comment + + ChangeMe +} diff --git a/t/t4018/cpp-c++-function b/t/t4018/cpp-c++-function new file mode 100644 index 0000000..9ee6bbe --- /dev/null +++ b/t/t4018/cpp-c++-function @@ -0,0 +1,4 @@ +Item RIGHT::DoSomething( Args with_spaces ) +{ + ChangeMe; +} diff --git a/t/t4018/cpp-class-constructor b/t/t4018/cpp-class-constructor new file mode 100644 index 0000000..ec4f115 --- /dev/null +++ b/t/t4018/cpp-class-constructor @@ -0,0 +1,4 @@ +Item::Item(int RIGHT) +{ + ChangeMe; +} diff --git a/t/t4018/cpp-class-constructor-mem-init b/t/t4018/cpp-class-constructor-mem-init new file mode 100644 index 0000000..49a69f3 --- /dev/null +++ b/t/t4018/cpp-class-constructor-mem-init @@ -0,0 +1,5 @@ +Item::Item(int RIGHT) : + member(0) +{ + ChangeMe; +} diff --git a/t/t4018/cpp-class-definition b/t/t4018/cpp-class-definition new file mode 100644 index 0000000..11b61da --- /dev/null +++ b/t/t4018/cpp-class-definition @@ -0,0 +1,4 @@ +class RIGHT +{ + int ChangeMe; +}; diff --git a/t/t4018/cpp-class-definition-derived b/t/t4018/cpp-class-definition-derived new file mode 100644 index 0000000..3b98cd0 --- /dev/null +++ b/t/t4018/cpp-class-definition-derived @@ -0,0 +1,5 @@ +class RIGHT : + public Baseclass +{ + int ChangeMe; +}; diff --git a/t/t4018/cpp-class-destructor b/t/t4018/cpp-class-destructor new file mode 100644 index 0000000..5487665 --- /dev/null +++ b/t/t4018/cpp-class-destructor @@ -0,0 +1,4 @@ +RIGHT::~RIGHT() +{ + ChangeMe; +} diff --git a/t/t4018/cpp-function-returning-global-type b/t/t4018/cpp-function-returning-global-type new file mode 100644 index 0000000..1084d59 --- /dev/null +++ b/t/t4018/cpp-function-returning-global-type @@ -0,0 +1,4 @@ +::Item get::it::RIGHT() +{ + ChangeMe; +} diff --git a/t/t4018/cpp-function-returning-nested b/t/t4018/cpp-function-returning-nested new file mode 100644 index 0000000..d9750aa --- /dev/null +++ b/t/t4018/cpp-function-returning-nested @@ -0,0 +1,5 @@ +get::Item get::it::RIGHT() +{ + ChangeMe; +} + diff --git a/t/t4018/cpp-function-returning-pointer b/t/t4018/cpp-function-returning-pointer new file mode 100644 index 0000000..ef15657 --- /dev/null +++ b/t/t4018/cpp-function-returning-pointer @@ -0,0 +1,4 @@ +const char *get_it_RIGHT(char *ptr) +{ + ChangeMe; +} diff --git a/t/t4018/cpp-function-returning-reference b/t/t4018/cpp-function-returning-reference new file mode 100644 index 0000000..01b051d --- /dev/null +++ b/t/t4018/cpp-function-returning-reference @@ -0,0 +1,4 @@ +string& get::it::RIGHT(char *ptr) +{ + ChangeMe; +} diff --git a/t/t4018/cpp-gnu-style-function b/t/t4018/cpp-gnu-style-function new file mode 100644 index 0000000..08c7c75 --- /dev/null +++ b/t/t4018/cpp-gnu-style-function @@ -0,0 +1,5 @@ +const char * +RIGHT(int arg) +{ + ChangeMe; +} diff --git a/t/t4018/cpp-namespace-definition b/t/t4018/cpp-namespace-definition new file mode 100644 index 0000000..6749980 --- /dev/null +++ b/t/t4018/cpp-namespace-definition @@ -0,0 +1,4 @@ +namespace RIGHT +{ + ChangeMe; +} diff --git a/t/t4018/cpp-operator-definition b/t/t4018/cpp-operator-definition new file mode 100644 index 0000000..1acd827 --- /dev/null +++ b/t/t4018/cpp-operator-definition @@ -0,0 +1,4 @@ +Value operator+(Value LEFT, Value RIGHT) +{ + ChangeMe; +} diff --git a/t/t4018/cpp-skip-access-specifiers b/t/t4018/cpp-skip-access-specifiers new file mode 100644 index 0000000..4d4a9db --- /dev/null +++ b/t/t4018/cpp-skip-access-specifiers @@ -0,0 +1,8 @@ +class RIGHT : public Baseclass +{ +public: +protected: +private: + void DoSomething(); + int ChangeMe; +}; diff --git a/t/t4018/cpp-skip-comment-block b/t/t4018/cpp-skip-comment-block new file mode 100644 index 0000000..3800b99 --- /dev/null +++ b/t/t4018/cpp-skip-comment-block @@ -0,0 +1,9 @@ +struct item RIGHT(int i) +// Do not +// pick up +/* these +** comments. +*/ +{ + ChangeMe; +} diff --git a/t/t4018/cpp-skip-labels b/t/t4018/cpp-skip-labels new file mode 100644 index 0000000..b9c10ab --- /dev/null +++ b/t/t4018/cpp-skip-labels @@ -0,0 +1,8 @@ +void RIGHT (void) +{ +repeat: // C++ comment +next: /* C comment */ + do_something(); + + ChangeMe; +} diff --git a/t/t4018/cpp-struct-definition b/t/t4018/cpp-struct-definition new file mode 100644 index 0000000..521c59f --- /dev/null +++ b/t/t4018/cpp-struct-definition @@ -0,0 +1,9 @@ +struct RIGHT { + unsigned + /* this bit field looks like a label and should not be picked up */ + decoy_bitfield: 2, + more : 1; + int filler; + + int ChangeMe; +}; diff --git a/t/t4018/cpp-struct-single-line b/t/t4018/cpp-struct-single-line new file mode 100644 index 0000000..a0de5fb --- /dev/null +++ b/t/t4018/cpp-struct-single-line @@ -0,0 +1,7 @@ +void wrong() +{ +} + +struct RIGHT_iterator_tag {}; + +int ChangeMe; diff --git a/t/t4018/cpp-template-function-definition b/t/t4018/cpp-template-function-definition new file mode 100644 index 0000000..0cdf5ba --- /dev/null +++ b/t/t4018/cpp-template-function-definition @@ -0,0 +1,4 @@ +template int RIGHT(T arg) +{ + ChangeMe; +} diff --git a/t/t4018/cpp-union-definition b/t/t4018/cpp-union-definition new file mode 100644 index 0000000..7ec94df --- /dev/null +++ b/t/t4018/cpp-union-definition @@ -0,0 +1,4 @@ +union RIGHT { + double v; + int ChangeMe; +}; diff --git a/t/t4018/cpp-void-c-function b/t/t4018/cpp-void-c-function new file mode 100644 index 0000000..153081e --- /dev/null +++ b/t/t4018/cpp-void-c-function @@ -0,0 +1,4 @@ +void RIGHT (void) +{ + ChangeMe; +} diff --git a/t/t4018/css-attribute-value-selector b/t/t4018/css-attribute-value-selector new file mode 100644 index 0000000..918256b --- /dev/null +++ b/t/t4018/css-attribute-value-selector @@ -0,0 +1,4 @@ +[class*="RIGHT"] { + background : #000; + border : 10px ChangeMe #C6C6C6; +} diff --git a/t/t4018/css-block-level-@-statements b/t/t4018/css-block-level-@-statements new file mode 100644 index 0000000..d6755f2 --- /dev/null +++ b/t/t4018/css-block-level-@-statements @@ -0,0 +1,10 @@ +@keyframes RIGHT { + from { + background : #000; + border : 10px ChangeMe #C6C6C6; + } + to { + background : #fff; + border : 10px solid #C6C6C6; + } +} diff --git a/t/t4018/css-brace-in-col-1 b/t/t4018/css-brace-in-col-1 new file mode 100644 index 0000000..7831577 --- /dev/null +++ b/t/t4018/css-brace-in-col-1 @@ -0,0 +1,5 @@ +RIGHT label.control-label +{ + margin-top: 10px!important; + border : 10px ChangeMe #C6C6C6; +} diff --git a/t/t4018/css-class-selector b/t/t4018/css-class-selector new file mode 100644 index 0000000..f790a00 --- /dev/null +++ b/t/t4018/css-class-selector @@ -0,0 +1,4 @@ +.RIGHT { + background : #000; + border : 10px ChangeMe #C6C6C6; +} diff --git a/t/t4018/css-colon-eol b/t/t4018/css-colon-eol new file mode 100644 index 0000000..5a30553 --- /dev/null +++ b/t/t4018/css-colon-eol @@ -0,0 +1,4 @@ +RIGHT h1 { +color: +ChangeMe; +} diff --git a/t/t4018/css-colon-selector b/t/t4018/css-colon-selector new file mode 100644 index 0000000..c6d71fb --- /dev/null +++ b/t/t4018/css-colon-selector @@ -0,0 +1,5 @@ +RIGHT a:hover { + margin-top: + 10px!important; + border : 10px ChangeMe #C6C6C6; +} diff --git a/t/t4018/css-common b/t/t4018/css-common new file mode 100644 index 0000000..84ed754 --- /dev/null +++ b/t/t4018/css-common @@ -0,0 +1,4 @@ +RIGHT label.control-label { + margin-top: 10px!important; + border : 10px ChangeMe #C6C6C6; +} diff --git a/t/t4018/css-id-selector b/t/t4018/css-id-selector new file mode 100644 index 0000000..17c5111 --- /dev/null +++ b/t/t4018/css-id-selector @@ -0,0 +1,4 @@ +#RIGHT { + background : #000; + border : 10px ChangeMe #C6C6C6; +} diff --git a/t/t4018/css-long-selector-list b/t/t4018/css-long-selector-list new file mode 100644 index 0000000..7ccd25d --- /dev/null +++ b/t/t4018/css-long-selector-list @@ -0,0 +1,6 @@ +p.header, +label.control-label, +div ul#RIGHT { + margin-top: 10px!important; + border : 10px ChangeMe #C6C6C6; +} diff --git a/t/t4018/css-prop-sans-indent b/t/t4018/css-prop-sans-indent new file mode 100644 index 0000000..a9e3c86 --- /dev/null +++ b/t/t4018/css-prop-sans-indent @@ -0,0 +1,5 @@ +RIGHT, label.control-label { +margin-top: 10px!important; +padding: 0; +border : 10px ChangeMe #C6C6C6; +} diff --git a/t/t4018/css-root-selector b/t/t4018/css-root-selector new file mode 100644 index 0000000..22b958e --- /dev/null +++ b/t/t4018/css-root-selector @@ -0,0 +1,4 @@ +:RIGHT { + background : #000; + border : 10px ChangeMe #C6C6C6; +} diff --git a/t/t4018/css-short-selector-list b/t/t4018/css-short-selector-list new file mode 100644 index 0000000..6a0bdee --- /dev/null +++ b/t/t4018/css-short-selector-list @@ -0,0 +1,4 @@ +label.control, div ul#RIGHT { + margin-top: 10px!important; + border : 10px ChangeMe #C6C6C6; +} diff --git a/t/t4018/css-trailing-space b/t/t4018/css-trailing-space new file mode 100644 index 0000000..32b5606 --- /dev/null +++ b/t/t4018/css-trailing-space @@ -0,0 +1,5 @@ +RIGHT label.control-label { + margin:10px; + padding:10px; + border : 10px ChangeMe #C6C6C6; +} diff --git a/t/t4018/custom1-pattern b/t/t4018/custom1-pattern new file mode 100644 index 0000000..e8fd59f --- /dev/null +++ b/t/t4018/custom1-pattern @@ -0,0 +1,17 @@ +public class Beer +{ + int special, RIGHT; + public static void main(String args[]) + { + String s=" "; + for(int x = 99; x > 0; x--) + { + System.out.print(x + " bottles of beer on the wall " + + x + " bottles of beer\n" // ChangeMe + + "Take one down, pass it around, " + (x - 1) + + " bottles of beer on the wall.\n"); + } + System.out.print("Go to the store, buy some more,\n" + + "99 bottles of beer on the wall.\n"); + } +} diff --git a/t/t4018/custom2-match-to-end-of-line b/t/t4018/custom2-match-to-end-of-line new file mode 100644 index 0000000..f88ac31 --- /dev/null +++ b/t/t4018/custom2-match-to-end-of-line @@ -0,0 +1,8 @@ +public class RIGHT_Beer +{ + int special; + public static void main(String args[]) + { + System.out.print("ChangeMe"); + } +} diff --git a/t/t4018/custom3-alternation-in-pattern b/t/t4018/custom3-alternation-in-pattern new file mode 100644 index 0000000..5f3769c --- /dev/null +++ b/t/t4018/custom3-alternation-in-pattern @@ -0,0 +1,17 @@ +public class Beer +{ + int special; + public static void main(String RIGHT[]) + { + String s=" "; + for(int x = 99; x > 0; x--) + { + System.out.print(x + " bottles of beer on the wall " + + x + " bottles of beer\n" // ChangeMe + + "Take one down, pass it around, " + (x - 1) + + " bottles of beer on the wall.\n"); + } + System.out.print("Go to the store, buy some more,\n" + + "99 bottles of beer on the wall.\n"); + } +} diff --git a/t/t4018/dts-labels b/t/t4018/dts-labels new file mode 100644 index 0000000..b21ef87 --- /dev/null +++ b/t/t4018/dts-labels @@ -0,0 +1,9 @@ +/ { + label_1: node1@ff00 { + label2: RIGHT { + vendor,some-property; + + ChangeMe = <0x45-30>; + }; + }; +}; diff --git a/t/t4018/dts-node-unitless b/t/t4018/dts-node-unitless new file mode 100644 index 0000000..c5287d9 --- /dev/null +++ b/t/t4018/dts-node-unitless @@ -0,0 +1,8 @@ +/ { + label_1: node1 { + RIGHT { + prop-array = <1>, <4>; + ChangeMe = <0xffeedd00>; + }; + }; +}; diff --git a/t/t4018/dts-nodes b/t/t4018/dts-nodes new file mode 100644 index 0000000..5a4334b --- /dev/null +++ b/t/t4018/dts-nodes @@ -0,0 +1,8 @@ +/ { + label_1: node1@ff00 { + RIGHT@deadf00,4000 { + #size-cells = <1>; + ChangeMe = <0xffeedd00>; + }; + }; +}; diff --git a/t/t4018/dts-nodes-boolean-prop b/t/t4018/dts-nodes-boolean-prop new file mode 100644 index 0000000..afc6b5b --- /dev/null +++ b/t/t4018/dts-nodes-boolean-prop @@ -0,0 +1,9 @@ +/ { + label_1: node1@ff00 { + RIGHT@deadf00,4000 { + boolean-prop1; + + ChangeMe; + }; + }; +}; diff --git a/t/t4018/dts-nodes-comment1 b/t/t4018/dts-nodes-comment1 new file mode 100644 index 0000000..559dfce --- /dev/null +++ b/t/t4018/dts-nodes-comment1 @@ -0,0 +1,8 @@ +/ { + label_1: node1@ff00 { + RIGHT@deadf00,4000 /* &a comment */ { + #size-cells = <1>; + ChangeMe = <0xffeedd00>; + }; + }; +}; diff --git a/t/t4018/dts-nodes-comment2 b/t/t4018/dts-nodes-comment2 new file mode 100644 index 0000000..27e9718 --- /dev/null +++ b/t/t4018/dts-nodes-comment2 @@ -0,0 +1,8 @@ +/ { + label_1: node1@ff00 { + RIGHT@deadf00,4000 { /* a trailing comment */ + #size-cells = <1>; + ChangeMe = <0xffeedd00>; + }; + }; +}; diff --git a/t/t4018/dts-nodes-multiline-prop b/t/t4018/dts-nodes-multiline-prop new file mode 100644 index 0000000..072d58b --- /dev/null +++ b/t/t4018/dts-nodes-multiline-prop @@ -0,0 +1,13 @@ +/ { + label_1: node1@ff00 { + RIGHT@deadf00,4000 { + multilineprop = <3>, + <4>, + <5>, + <6>, + <7>; + + ChangeMe = <0xffeedd00>; + }; + }; +}; diff --git a/t/t4018/dts-reference b/t/t4018/dts-reference new file mode 100644 index 0000000..8f0c87d --- /dev/null +++ b/t/t4018/dts-reference @@ -0,0 +1,9 @@ +&label_1 { + TEST = <455>; +}; + +&RIGHT { + vendor,some-property; + + ChangeMe = <0x45-30>; +}; diff --git a/t/t4018/dts-root b/t/t4018/dts-root new file mode 100644 index 0000000..4353b82 --- /dev/null +++ b/t/t4018/dts-root @@ -0,0 +1,5 @@ +/ { RIGHT /* Technically just supposed to be a slash and brace */ + #size-cells = <1>; + + ChangeMe = <0xffeedd00>; +}; diff --git a/t/t4018/dts-root-comment b/t/t4018/dts-root-comment new file mode 100644 index 0000000..333a625 --- /dev/null +++ b/t/t4018/dts-root-comment @@ -0,0 +1,8 @@ +/ { RIGHT /* Technically just supposed to be a slash and brace */ + #size-cells = <1>; + + /* This comment should be ignored */ + + some-property = <40+2>; + ChangeMe = <0xffeedd00>; +}; diff --git a/t/t4018/elixir-do-not-pick-end b/t/t4018/elixir-do-not-pick-end new file mode 100644 index 0000000..fae08ba --- /dev/null +++ b/t/t4018/elixir-do-not-pick-end @@ -0,0 +1,5 @@ +defmodule RIGHT do +end +# +# +# ChangeMe; do not pick up 'end' line diff --git a/t/t4018/elixir-ex-unit-test b/t/t4018/elixir-ex-unit-test new file mode 100644 index 0000000..0560a2b --- /dev/null +++ b/t/t4018/elixir-ex-unit-test @@ -0,0 +1,6 @@ +defmodule Test do + test "RIGHT" do + assert true == true + assert ChangeMe + end +end diff --git a/t/t4018/elixir-function b/t/t4018/elixir-function new file mode 100644 index 0000000..d452f49 --- /dev/null +++ b/t/t4018/elixir-function @@ -0,0 +1,5 @@ +def function(RIGHT, arg) do + # comment + # comment + ChangeMe +end diff --git a/t/t4018/elixir-macro b/t/t4018/elixir-macro new file mode 100644 index 0000000..4f925e9 --- /dev/null +++ b/t/t4018/elixir-macro @@ -0,0 +1,5 @@ +defmacro foo(RIGHT) do + # Code + # Code + ChangeMe +end diff --git a/t/t4018/elixir-module b/t/t4018/elixir-module new file mode 100644 index 0000000..91a4e7a --- /dev/null +++ b/t/t4018/elixir-module @@ -0,0 +1,9 @@ +defmodule RIGHT do + @moduledoc """ + Foo bar + """ + + def ChangeMe(a) where is_map(a) do + a + end +end diff --git a/t/t4018/elixir-module-func b/t/t4018/elixir-module-func new file mode 100644 index 0000000..c9910d0 --- /dev/null +++ b/t/t4018/elixir-module-func @@ -0,0 +1,8 @@ +defmodule Foo do + def fun(RIGHT) do + # Code + # Code + # Code + ChangeMe + end +end diff --git a/t/t4018/elixir-nested-module b/t/t4018/elixir-nested-module new file mode 100644 index 0000000..771ebc5 --- /dev/null +++ b/t/t4018/elixir-nested-module @@ -0,0 +1,9 @@ +defmodule MyApp.RIGHT do + @moduledoc """ + Foo bar + """ + + def ChangeMe(a) where is_map(a) do + a + end +end diff --git a/t/t4018/elixir-private-function b/t/t4018/elixir-private-function new file mode 100644 index 0000000..1aabe33 --- /dev/null +++ b/t/t4018/elixir-private-function @@ -0,0 +1,5 @@ +defp function(RIGHT, arg) do + # comment + # comment + ChangeMe +end diff --git a/t/t4018/elixir-protocol b/t/t4018/elixir-protocol new file mode 100644 index 0000000..7d91736 --- /dev/null +++ b/t/t4018/elixir-protocol @@ -0,0 +1,6 @@ +defprotocol RIGHT do + @doc """ + Calculates the size (and not the length!) of a data structure + """ + def size(data, ChangeMe) +end diff --git a/t/t4018/elixir-protocol-implementation b/t/t4018/elixir-protocol-implementation new file mode 100644 index 0000000..f9234bb --- /dev/null +++ b/t/t4018/elixir-protocol-implementation @@ -0,0 +1,5 @@ +defimpl RIGHT do + # Docs + # Docs + def foo(ChangeMe), do: :ok +end diff --git a/t/t4018/fortran-block-data b/t/t4018/fortran-block-data new file mode 100644 index 0000000..63d4e21 --- /dev/null +++ b/t/t4018/fortran-block-data @@ -0,0 +1,5 @@ + BLOCK DATA RIGHT + + COMMON /B/ C, ChangeMe + DATA C, ChangeMe / 2.0, 6.0 / + END diff --git a/t/t4018/fortran-comment b/t/t4018/fortran-comment new file mode 100644 index 0000000..7b10d17 --- /dev/null +++ b/t/t4018/fortran-comment @@ -0,0 +1,13 @@ + module a + + contains + + ! subroutine wrong + subroutine RIGHT + ! subroutine wrong + + real ChangeMe + + end subroutine RIGHT + + end module a diff --git a/t/t4018/fortran-comment-keyword b/t/t4018/fortran-comment-keyword new file mode 100644 index 0000000..e9206a5 --- /dev/null +++ b/t/t4018/fortran-comment-keyword @@ -0,0 +1,14 @@ + module a + + contains + + subroutine RIGHT (funcA, funcB) + + real funcA ! grid function a + real funcB ! grid function b + + real ChangeMe + + end subroutine RIGHT + + end module a diff --git a/t/t4018/fortran-comment-legacy b/t/t4018/fortran-comment-legacy new file mode 100644 index 0000000..53cd062 --- /dev/null +++ b/t/t4018/fortran-comment-legacy @@ -0,0 +1,13 @@ + module a + + contains + +C subroutine wrong + subroutine RIGHT +C subroutine wrong + + real ChangeMe + + end subroutine RIGHT + + end module a diff --git a/t/t4018/fortran-comment-legacy-star b/t/t4018/fortran-comment-legacy-star new file mode 100644 index 0000000..2cbcdc3 --- /dev/null +++ b/t/t4018/fortran-comment-legacy-star @@ -0,0 +1,13 @@ + module a + + contains + +* subroutine wrong + subroutine RIGHT +* subroutine wrong + + real ChangeMe + + end subroutine RIGHT + + end module a diff --git a/t/t4018/fortran-external-function b/t/t4018/fortran-external-function new file mode 100644 index 0000000..5a2d85d --- /dev/null +++ b/t/t4018/fortran-external-function @@ -0,0 +1,9 @@ +function RIGHT(a, b) result(c) + +integer, intent(in) :: ChangeMe +integer, intent(in) :: b +integer, intent(out) :: c + +c = a+b + +end function RIGHT diff --git a/t/t4018/fortran-external-subroutine b/t/t4018/fortran-external-subroutine new file mode 100644 index 0000000..4ce85fe --- /dev/null +++ b/t/t4018/fortran-external-subroutine @@ -0,0 +1,5 @@ +subroutine RIGHT + +real ChangeMe + +end subroutine RIGHT diff --git a/t/t4018/fortran-module b/t/t4018/fortran-module new file mode 100644 index 0000000..c4b737d --- /dev/null +++ b/t/t4018/fortran-module @@ -0,0 +1,5 @@ +module RIGHT + +use ChangeMe + +end module RIGHT diff --git a/t/t4018/fortran-module-procedure b/t/t4018/fortran-module-procedure new file mode 100644 index 0000000..1ce6d85 --- /dev/null +++ b/t/t4018/fortran-module-procedure @@ -0,0 +1,13 @@ + module RIGHT + + implicit none + private + + interface letters ! generic interface + module procedure aaaa, & + bbbb, & + ChangeMe, & + dddd + end interface + +end module RIGHT diff --git a/t/t4018/fortran-program b/t/t4018/fortran-program new file mode 100644 index 0000000..4616895 --- /dev/null +++ b/t/t4018/fortran-program @@ -0,0 +1,5 @@ +program RIGHT + +call ChangeMe + +end program RIGHT diff --git a/t/t4018/fountain-scene b/t/t4018/fountain-scene new file mode 100644 index 0000000..6b3257d --- /dev/null +++ b/t/t4018/fountain-scene @@ -0,0 +1,4 @@ +EXT. STREET RIGHT OUTSIDE - DAY + +CHARACTER +You didn't say the magic phrase, "ChangeMe". diff --git a/t/t4018/golang-complex-function b/t/t4018/golang-complex-function new file mode 100644 index 0000000..e057dce --- /dev/null +++ b/t/t4018/golang-complex-function @@ -0,0 +1,8 @@ +type Test struct { + a Type +} + +func (t *Test) RIGHT(a Type) (Type, error) { + t.a = a + return ChangeMe, nil +} diff --git a/t/t4018/golang-func b/t/t4018/golang-func new file mode 100644 index 0000000..8e9c9ac --- /dev/null +++ b/t/t4018/golang-func @@ -0,0 +1,4 @@ +func RIGHT() { + a := 5 + b := ChangeMe +} diff --git a/t/t4018/golang-interface b/t/t4018/golang-interface new file mode 100644 index 0000000..553bede --- /dev/null +++ b/t/t4018/golang-interface @@ -0,0 +1,4 @@ +type RIGHT interface { + a() Type + b() ChangeMe +} diff --git a/t/t4018/golang-long-func b/t/t4018/golang-long-func new file mode 100644 index 0000000..ac3a77b --- /dev/null +++ b/t/t4018/golang-long-func @@ -0,0 +1,5 @@ +func RIGHT(aVeryVeryVeryLongVariableName AVeryVeryVeryLongType, + anotherLongVariableName AnotherLongType) { + a := 5 + b := ChangeMe +} diff --git a/t/t4018/golang-struct b/t/t4018/golang-struct new file mode 100644 index 0000000..5deda77 --- /dev/null +++ b/t/t4018/golang-struct @@ -0,0 +1,4 @@ +type RIGHT struct { + a Type + b ChangeMe +} diff --git a/t/t4018/java-class-member-function b/t/t4018/java-class-member-function new file mode 100644 index 0000000..298bc7a --- /dev/null +++ b/t/t4018/java-class-member-function @@ -0,0 +1,8 @@ +public class Beer +{ + int special; + public static void main(String RIGHT[]) + { + System.out.print("ChangeMe"); + } +} diff --git a/t/t4018/markdown-heading-indented b/t/t4018/markdown-heading-indented new file mode 100644 index 0000000..1991c2b --- /dev/null +++ b/t/t4018/markdown-heading-indented @@ -0,0 +1,6 @@ +Indented headings are allowed, as long as the indent is no more than 3 spaces. + + ### RIGHT + +- something +- ChangeMe diff --git a/t/t4018/markdown-heading-non-headings b/t/t4018/markdown-heading-non-headings new file mode 100644 index 0000000..c479c1a --- /dev/null +++ b/t/t4018/markdown-heading-non-headings @@ -0,0 +1,17 @@ +Headings can be right next to other lines of the file: +# RIGHT +Indents of four or more spaces make a code block: + + # code comment, not heading + +If there's no space after the final hash, it's not a heading: + +#hashtag + +Sequences of more than 6 hashes don't make a heading: + +####### over-enthusiastic heading + +So the detected heading should be right up at the start of this file. + +ChangeMe diff --git a/t/t4018/matlab-class-definition b/t/t4018/matlab-class-definition new file mode 100644 index 0000000..84daedf --- /dev/null +++ b/t/t4018/matlab-class-definition @@ -0,0 +1,5 @@ +classdef RIGHT + properties + ChangeMe + end +end diff --git a/t/t4018/matlab-function b/t/t4018/matlab-function new file mode 100644 index 0000000..897a9b1 --- /dev/null +++ b/t/t4018/matlab-function @@ -0,0 +1,4 @@ +function y = RIGHT() +x = 5; +y = ChangeMe + x; +end diff --git a/t/t4018/matlab-octave-section-1 b/t/t4018/matlab-octave-section-1 new file mode 100644 index 0000000..3bb6c46 --- /dev/null +++ b/t/t4018/matlab-octave-section-1 @@ -0,0 +1,3 @@ +%%% RIGHT section +# this is octave script +ChangeMe = 1; diff --git a/t/t4018/matlab-octave-section-2 b/t/t4018/matlab-octave-section-2 new file mode 100644 index 0000000..ab2980f --- /dev/null +++ b/t/t4018/matlab-octave-section-2 @@ -0,0 +1,3 @@ +## RIGHT section +# this is octave script +ChangeMe = 1; diff --git a/t/t4018/matlab-section b/t/t4018/matlab-section new file mode 100644 index 0000000..5ea59a5 --- /dev/null +++ b/t/t4018/matlab-section @@ -0,0 +1,3 @@ +%% RIGHT section +% this is understood by both matlab and octave +ChangeMe = 1; diff --git a/t/t4018/perl-skip-end-of-heredoc b/t/t4018/perl-skip-end-of-heredoc new file mode 100644 index 0000000..c22d39b --- /dev/null +++ b/t/t4018/perl-skip-end-of-heredoc @@ -0,0 +1,8 @@ +sub RIGHTwithheredocument { + print <<"EOF" +decoy here-doc +EOF + # some lines of context + # to pad it out + print "ChangeMe\n"; +} diff --git a/t/t4018/perl-skip-forward-decl b/t/t4018/perl-skip-forward-decl new file mode 100644 index 0000000..a98cb8b --- /dev/null +++ b/t/t4018/perl-skip-forward-decl @@ -0,0 +1,10 @@ +package RIGHT; + +use strict; +use warnings; +use parent qw(Exporter); +our @EXPORT_OK = qw(round finalround); + +sub other; # forward declaration + +# ChangeMe diff --git a/t/t4018/perl-skip-sub-in-pod b/t/t4018/perl-skip-sub-in-pod new file mode 100644 index 0000000..e39f024 --- /dev/null +++ b/t/t4018/perl-skip-sub-in-pod @@ -0,0 +1,18 @@ +=head1 NAME + +Beer - subroutine to output fragment of a drinking song + +=head1 SYNOPSIS_RIGHT + + use Beer qw(round finalround); + + sub song { + for (my $i = 99; $i > 0; $i--) { + round $i; + } + finalround; + } + + ChangeMe; + +=cut diff --git a/t/t4018/perl-sub-definition b/t/t4018/perl-sub-definition new file mode 100644 index 0000000..a507d1f --- /dev/null +++ b/t/t4018/perl-sub-definition @@ -0,0 +1,4 @@ +sub RIGHT { + my ($n) = @_; + print "ChangeMe"; +} diff --git a/t/t4018/perl-sub-definition-kr-brace b/t/t4018/perl-sub-definition-kr-brace new file mode 100644 index 0000000..330b3df --- /dev/null +++ b/t/t4018/perl-sub-definition-kr-brace @@ -0,0 +1,4 @@ +sub RIGHT +{ + print "ChangeMe\n"; +} diff --git a/t/t4018/php-abstract-class b/t/t4018/php-abstract-class new file mode 100644 index 0000000..5213e12 --- /dev/null +++ b/t/t4018/php-abstract-class @@ -0,0 +1,4 @@ +abstract class RIGHT +{ + const FOO = 'ChangeMe'; +} diff --git a/t/t4018/php-abstract-method b/t/t4018/php-abstract-method new file mode 100644 index 0000000..ce215df --- /dev/null +++ b/t/t4018/php-abstract-method @@ -0,0 +1,7 @@ +abstract class Klass +{ + abstract public function RIGHT(): ?string + { + return 'ChangeMe'; + } +} diff --git a/t/t4018/php-class b/t/t4018/php-class new file mode 100644 index 0000000..7785b63 --- /dev/null +++ b/t/t4018/php-class @@ -0,0 +1,4 @@ +class RIGHT +{ + const FOO = 'ChangeMe'; +} diff --git a/t/t4018/php-final-class b/t/t4018/php-final-class new file mode 100644 index 0000000..69f5710 --- /dev/null +++ b/t/t4018/php-final-class @@ -0,0 +1,4 @@ +final class RIGHT +{ + const FOO = 'ChangeMe'; +} diff --git a/t/t4018/php-final-method b/t/t4018/php-final-method new file mode 100644 index 0000000..537fb8a --- /dev/null +++ b/t/t4018/php-final-method @@ -0,0 +1,7 @@ +class Klass +{ + final public function RIGHT(): string + { + return 'ChangeMe'; + } +} diff --git a/t/t4018/php-function b/t/t4018/php-function new file mode 100644 index 0000000..35717c5 --- /dev/null +++ b/t/t4018/php-function @@ -0,0 +1,4 @@ +function RIGHT() +{ + return 'ChangeMe'; +} diff --git a/t/t4018/php-interface b/t/t4018/php-interface new file mode 100644 index 0000000..86b49ad --- /dev/null +++ b/t/t4018/php-interface @@ -0,0 +1,4 @@ +interface RIGHT +{ + public function foo($ChangeMe); +} diff --git a/t/t4018/php-method b/t/t4018/php-method new file mode 100644 index 0000000..03af1a6 --- /dev/null +++ b/t/t4018/php-method @@ -0,0 +1,7 @@ +class Klass +{ + public static function RIGHT() + { + return 'ChangeMe'; + } +} diff --git a/t/t4018/php-trait b/t/t4018/php-trait new file mode 100644 index 0000000..65b8c82 --- /dev/null +++ b/t/t4018/php-trait @@ -0,0 +1,7 @@ +trait RIGHT +{ + public function foo($ChangeMe) + { + return 'foo'; + } +} diff --git a/t/t4018/python-async-def b/t/t4018/python-async-def new file mode 100644 index 0000000..87640e0 --- /dev/null +++ b/t/t4018/python-async-def @@ -0,0 +1,4 @@ +async def RIGHT(pi: int = 3.14): + while True: + break + return ChangeMe() diff --git a/t/t4018/python-class b/t/t4018/python-class new file mode 100644 index 0000000..ba9e741 --- /dev/null +++ b/t/t4018/python-class @@ -0,0 +1,4 @@ +class RIGHT(int, str): + # comment + # another comment + # ChangeMe diff --git a/t/t4018/python-def b/t/t4018/python-def new file mode 100644 index 0000000..e50b31b --- /dev/null +++ b/t/t4018/python-def @@ -0,0 +1,4 @@ +def RIGHT(pi: int = 3.14): + while True: + break + return ChangeMe() diff --git a/t/t4018/python-indented-async-def b/t/t4018/python-indented-async-def new file mode 100644 index 0000000..f5d0325 --- /dev/null +++ b/t/t4018/python-indented-async-def @@ -0,0 +1,7 @@ +class Foo: + async def RIGHT(self, x: int): + return [ + 1, + 2, + ChangeMe, + ] diff --git a/t/t4018/python-indented-class b/t/t4018/python-indented-class new file mode 100644 index 0000000..19b4f35 --- /dev/null +++ b/t/t4018/python-indented-class @@ -0,0 +1,5 @@ +if TYPE_CHECKING: + class RIGHT: + # comment + # another comment + # ChangeMe diff --git a/t/t4018/python-indented-def b/t/t4018/python-indented-def new file mode 100644 index 0000000..208fbad --- /dev/null +++ b/t/t4018/python-indented-def @@ -0,0 +1,7 @@ +class Foo: + def RIGHT(self, x: int): + return [ + 1, + 2, + ChangeMe, + ] diff --git a/t/t4018/rust-fn b/t/t4018/rust-fn new file mode 100644 index 0000000..cbe0215 --- /dev/null +++ b/t/t4018/rust-fn @@ -0,0 +1,5 @@ +pub(self) fn RIGHT(x: &[T]) where T: Debug { + let _ = x; + // a comment + let a = ChangeMe; +} diff --git a/t/t4018/rust-impl b/t/t4018/rust-impl new file mode 100644 index 0000000..09df3cd --- /dev/null +++ b/t/t4018/rust-impl @@ -0,0 +1,5 @@ +impl<'a, T: AsRef<[u8]>> std::RIGHT for Git<'a> { + + pub fn ChangeMe(&self) -> () { + } +} diff --git a/t/t4018/rust-macro-rules b/t/t4018/rust-macro-rules new file mode 100644 index 0000000..ec610c5 --- /dev/null +++ b/t/t4018/rust-macro-rules @@ -0,0 +1,6 @@ +macro_rules! RIGHT { + () => { + // a comment + let x = ChangeMe; + }; +} diff --git a/t/t4018/rust-struct b/t/t4018/rust-struct new file mode 100644 index 0000000..76aff1c --- /dev/null +++ b/t/t4018/rust-struct @@ -0,0 +1,5 @@ +#[derive(Debug)] +pub(super) struct RIGHT<'a> { + name: &'a str, + age: ChangeMe, +} diff --git a/t/t4018/rust-trait b/t/t4018/rust-trait new file mode 100644 index 0000000..ea397f0 --- /dev/null +++ b/t/t4018/rust-trait @@ -0,0 +1,5 @@ +unsafe trait RIGHT { + fn len(&self) -> u32; + fn ChangeMe(&self, n: u32) -> T; + fn iter(&self, f: F) where F: Fn(T); +} -- cgit v1.2.3