@@ -61,33 +61,42 @@ test_expect_success 'last regexp must not be negated' '
test_i18ngrep ": Last expression must not be negated:" msg
'
-test_expect_success 'setup hunk header tests' '
- for i in $diffpatterns
- do
- echo "$i-* diff=$i"
- done > .gitattributes &&
-
- # add all test files to the index
- (
- cd "$TEST_DIRECTORY"/t4018 &&
- git --git-dir="$TRASH_DIRECTORY/.git" add .
- ) &&
-
- # place modified files in the worktree
- for i in $(git ls-files)
- do
- sed -e "s/ChangeMe/IWasChanged/" <"$TEST_DIRECTORY/t4018/$i" >"$i" || return 1
- done
-'
+test_diff_funcname () {
+ desc=$1
+ cat <&8 >arg.header &&
+ cat <&9 >arg.test &&
+ what=$(cat arg.what) &&
+
+ test_expect_success "setup: $desc" '
+ cp arg.test "$what" &&
+ cp arg.header expected &&
+ git add "$what" &&
+ sed -e "s/ChangeMe/IWasChanged/" <"$what" >tmp &&
+ mv tmp "$what"
+ ' &&
+
+ test_expect_success "$desc" '
+ git diff -U1 "$what" >diff &&
+ sed -n -e "s/^.*@@\( \|$\)//p" <diff >actual &&
+ test_cmp expected actual
+ '
+}
-# check each individual file
-for i in $(git ls-files -- ':!*.ctx')
+for what in $diffpatterns
do
- test_expect_success "hunk header: $i" "
- git diff -U1 $i >diff &&
- sed -n -e 's/^.*@@\( \|$\)//p' <diff >ctx &&
- test_cmp $i.ctx ctx
- "
+ test="$TEST_DIRECTORY/t4018/$what.sh"
+ if ! test -e "$test"
+ then
+ test_expect_failure "$what: no tests" 'false'
+ continue
+ fi &&
+
+ test_expect_success "setup: hunk header for $what" '
+ echo "$what diff=$what" >.gitattributes &&
+ echo "$what" >arg.what
+ ' &&
+
+ . "$test"
done
test_done
deleted file mode 100644
@@ -1,15 +0,0 @@
-How to write test cases
-=======================
-
-Create test cases called "LANG-whatever" in this directory, where
-"LANG" is e.g. the userdiff driver name, where "whatever" is a brief
-description of the test.
-
-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 contains the word
-"RIGHT" by convention. The "LANG-whatever.ctx" file contains what we
-expect to appear in the hunk header. We munged the start of the line
-to "@@ [...] @@" for ease of not having to hardcode the line numbers
-and offsets.
deleted file mode 100644
@@ -1 +0,0 @@
-description of the test.
deleted file mode 100644
@@ -1,4 +0,0 @@
-RIGHT() ((
-
- ChangeMe = "$x" + "$y"
-))
deleted file mode 100644
@@ -1 +0,0 @@
-RIGHT()
deleted file mode 100644
@@ -1,6 +0,0 @@
-function RIGHT {
- function InvalidSyntax{
- :
- echo 'ChangeMe'
- }
-}
deleted file mode 100644
@@ -1 +0,0 @@
-function RIGHT {
deleted file mode 100644
@@ -1,4 +0,0 @@
-function RIGHT {
- :
- echo 'ChangeMe'
-}
deleted file mode 100644
@@ -1 +0,0 @@
-function RIGHT {
deleted file mode 100644
@@ -1,4 +0,0 @@
- function RIGHT ( ) {
-
- ChangeMe
- }
deleted file mode 100644
@@ -1 +0,0 @@
-function RIGHT ( ) {
deleted file mode 100644
@@ -1,4 +0,0 @@
-RIGHT() [[ \
-
- "$a" > "$ChangeMe"
-]]
deleted file mode 100644
@@ -1 +0,0 @@
-RIGHT()
deleted file mode 100644
@@ -1,6 +0,0 @@
-function RIGHT {
- functionInvalidSyntax {
- :
- echo 'ChangeMe'
- }
-}
deleted file mode 100644
@@ -1 +0,0 @@
-function RIGHT {
deleted file mode 100644
@@ -1,4 +0,0 @@
-function RIGHT(){
- :
- echo 'ChangeMe'
-}
deleted file mode 100644
@@ -1 +0,0 @@
-function RIGHT(){
deleted file mode 100644
@@ -1,4 +0,0 @@
-function RIGHT() {
-
- ChangeMe
-}
deleted file mode 100644
@@ -1 +0,0 @@
-function RIGHT() {
deleted file mode 100644
@@ -1,6 +0,0 @@
-outer() {
- RIGHT() {
- :
- echo 'ChangeMe'
- }
-}
deleted file mode 100644
@@ -1 +0,0 @@
-RIGHT()
deleted file mode 100644
@@ -1,4 +0,0 @@
-_RIGHT_0n() {
-
- ChangeMe
-}
deleted file mode 100644
@@ -1 +0,0 @@
-_RIGHT_0n()
deleted file mode 100644
@@ -1,4 +0,0 @@
-RIGHT(){
-
- ChangeMe
-}
deleted file mode 100644
@@ -1 +0,0 @@
-RIGHT()
deleted file mode 100644
@@ -1,4 +0,0 @@
-RIGHT() {
-
- ChangeMe
-}
deleted file mode 100644
@@ -1 +0,0 @@
-RIGHT()
deleted file mode 100644
@@ -1,4 +0,0 @@
- RIGHT ( ) {
-
- ChangeMe
- }
deleted file mode 100644
@@ -1 +0,0 @@
-RIGHT ( )
deleted file mode 100644
@@ -1,4 +0,0 @@
-RIGHT() (
-
- ChangeMe=2
-)
deleted file mode 100644
@@ -1 +0,0 @@
-RIGHT()
deleted file mode 100644
@@ -1,4 +0,0 @@
-RIGHT() { # Comment
-
- ChangeMe
-}
deleted file mode 100644
@@ -1 +0,0 @@
-RIGHT()
new file mode 100755
@@ -0,0 +1,160 @@
+#!/bin/sh
+#
+# See ../t4018-diff-funcname.sh's test_diff_funcname()
+#
+
+test_diff_funcname 'bash: arithmetic function' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+RIGHT()
+EOF_HUNK
+RIGHT() ((
+
+ ChangeMe = "$x" + "$y"
+))
+EOF_TEST
+
+test_diff_funcname 'bash: bashism style compact' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+function RIGHT {
+EOF_HUNK
+function RIGHT {
+ function InvalidSyntax{
+ :
+ echo 'ChangeMe'
+ }
+}
+EOF_TEST
+
+test_diff_funcname 'bash: bashism style function' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+function RIGHT {
+EOF_HUNK
+function RIGHT {
+ :
+ echo 'ChangeMe'
+}
+EOF_TEST
+
+test_diff_funcname 'bash: bashism style whitespace' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+function RIGHT ( ) {
+EOF_HUNK
+ function RIGHT ( ) {
+
+ ChangeMe
+ }
+EOF_TEST
+
+test_diff_funcname 'bash: conditional function' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+RIGHT()
+EOF_HUNK
+RIGHT() [[ \
+
+ "$a" > "$ChangeMe"
+]]
+EOF_TEST
+
+test_diff_funcname 'bash: missing parentheses' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+function RIGHT {
+EOF_HUNK
+function RIGHT {
+ functionInvalidSyntax {
+ :
+ echo 'ChangeMe'
+ }
+}
+EOF_TEST
+
+test_diff_funcname 'bash: mixed style compact' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+function RIGHT(){
+EOF_HUNK
+function RIGHT(){
+ :
+ echo 'ChangeMe'
+}
+EOF_TEST
+
+test_diff_funcname 'bash: mixed style function' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+function RIGHT() {
+EOF_HUNK
+function RIGHT() {
+
+ ChangeMe
+}
+EOF_TEST
+
+test_diff_funcname 'bash: nested functions' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+RIGHT()
+EOF_HUNK
+outer() {
+ RIGHT() {
+ :
+ echo 'ChangeMe'
+ }
+}
+EOF_TEST
+
+test_diff_funcname 'bash: other characters' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+_RIGHT_0n()
+EOF_HUNK
+_RIGHT_0n() {
+
+ ChangeMe
+}
+EOF_TEST
+
+test_diff_funcname 'bash: posix style compact' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+RIGHT()
+EOF_HUNK
+RIGHT(){
+
+ ChangeMe
+}
+EOF_TEST
+
+test_diff_funcname 'bash: posix style function' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+RIGHT()
+EOF_HUNK
+RIGHT() {
+
+ ChangeMe
+}
+EOF_TEST
+
+test_diff_funcname 'bash: posix style whitespace' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+RIGHT ( )
+EOF_HUNK
+ RIGHT ( ) {
+
+ ChangeMe
+ }
+EOF_TEST
+
+test_diff_funcname 'bash: subshell function' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+RIGHT()
+EOF_HUNK
+RIGHT() (
+
+ ChangeMe=2
+)
+EOF_TEST
+
+test_diff_funcname 'bash: trailing comment' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+RIGHT()
+EOF_HUNK
+RIGHT() { # Comment
+
+ ChangeMe
+}
+EOF_TEST
deleted file mode 100644
@@ -1,4 +0,0 @@
-Item RIGHT::DoSomething( Args with_spaces )
-{
- ChangeMe;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-Item RIGHT::DoSomething( Args with_spaces )
deleted file mode 100644
@@ -1,4 +0,0 @@
-Item::Item(int RIGHT)
-{
- ChangeMe;
-}
deleted file mode 100644
@@ -1,5 +0,0 @@
-Item::Item(int RIGHT) :
- member(0)
-{
- ChangeMe;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-Item::Item(int RIGHT) :
deleted file mode 100644
@@ -1 +0,0 @@
-Item::Item(int RIGHT)
deleted file mode 100644
@@ -1,4 +0,0 @@
-class RIGHT
-{
- int ChangeMe;
-};
deleted file mode 100644
@@ -1,5 +0,0 @@
-class RIGHT :
- public Baseclass
-{
- int ChangeMe;
-};
deleted file mode 100644
@@ -1 +0,0 @@
-class RIGHT :
deleted file mode 100644
@@ -1 +0,0 @@
-class RIGHT
deleted file mode 100644
@@ -1,4 +0,0 @@
-RIGHT::~RIGHT()
-{
- ChangeMe;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-RIGHT::~RIGHT()
deleted file mode 100644
@@ -1,4 +0,0 @@
-::Item get::it::RIGHT()
-{
- ChangeMe;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-::Item get::it::RIGHT()
deleted file mode 100644
@@ -1,5 +0,0 @@
-get::Item get::it::RIGHT()
-{
- ChangeMe;
-}
-
deleted file mode 100644
@@ -1 +0,0 @@
-get::Item get::it::RIGHT()
deleted file mode 100644
@@ -1,4 +0,0 @@
-const char *get_it_RIGHT(char *ptr)
-{
- ChangeMe;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-const char *get_it_RIGHT(char *ptr)
deleted file mode 100644
@@ -1,4 +0,0 @@
-string& get::it::RIGHT(char *ptr)
-{
- ChangeMe;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-string& get::it::RIGHT(char *ptr)
deleted file mode 100644
@@ -1,5 +0,0 @@
-const char *
-RIGHT(int arg)
-{
- ChangeMe;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-RIGHT(int arg)
deleted file mode 100644
@@ -1,4 +0,0 @@
-namespace RIGHT
-{
- ChangeMe;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-namespace RIGHT
deleted file mode 100644
@@ -1,4 +0,0 @@
-Value operator+(Value LEFT, Value RIGHT)
-{
- ChangeMe;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-Value operator+(Value LEFT, Value RIGHT)
deleted file mode 100644
@@ -1,8 +0,0 @@
-class RIGHT : public Baseclass
-{
-public:
-protected:
-private:
- void DoSomething();
- int ChangeMe;
-};
deleted file mode 100644
@@ -1 +0,0 @@
-class RIGHT : public Baseclass
deleted file mode 100644
@@ -1,9 +0,0 @@
-struct item RIGHT(int i)
-// Do not
-// pick up
-/* these
-** comments.
-*/
-{
- ChangeMe;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-struct item RIGHT(int i)
deleted file mode 100644
@@ -1,8 +0,0 @@
-void RIGHT (void)
-{
-repeat: // C++ comment
-next: /* C comment */
- do_something();
-
- ChangeMe;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-void RIGHT (void)
deleted file mode 100644
@@ -1,9 +0,0 @@
-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;
-};
deleted file mode 100644
@@ -1 +0,0 @@
-struct RIGHT {
deleted file mode 100644
@@ -1,7 +0,0 @@
-void wrong()
-{
-}
-
-struct RIGHT_iterator_tag {};
-
-int ChangeMe;
deleted file mode 100644
@@ -1 +0,0 @@
-struct RIGHT_iterator_tag {};
deleted file mode 100644
@@ -1,4 +0,0 @@
-template<class T> int RIGHT(T arg)
-{
- ChangeMe;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-template<class T> int RIGHT(T arg)
deleted file mode 100644
@@ -1,4 +0,0 @@
-union RIGHT {
- double v;
- int ChangeMe;
-};
deleted file mode 100644
@@ -1 +0,0 @@
-union RIGHT {
deleted file mode 100644
@@ -1,4 +0,0 @@
-void RIGHT (void)
-{
- ChangeMe;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-void RIGHT (void)
new file mode 100755
@@ -0,0 +1,239 @@
+#!/bin/sh
+#
+# See ../t4018-diff-funcname.sh's test_diff_funcname()
+#
+
+test_diff_funcname 'cpp: c++ function' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+Item RIGHT::DoSomething( Args with_spaces )
+EOF_HUNK
+Item RIGHT::DoSomething( Args with_spaces )
+{
+ ChangeMe;
+}
+EOF_TEST
+
+test_diff_funcname 'cpp: class constructor' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+Item::Item(int RIGHT)
+EOF_HUNK
+Item::Item(int RIGHT)
+{
+ ChangeMe;
+}
+EOF_TEST
+
+test_diff_funcname 'cpp: class constructor mem init' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+Item::Item(int RIGHT) :
+EOF_HUNK
+Item::Item(int RIGHT) :
+ member(0)
+{
+ ChangeMe;
+}
+EOF_TEST
+
+test_diff_funcname 'cpp: class definition' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+class RIGHT
+EOF_HUNK
+class RIGHT
+{
+ int ChangeMe;
+};
+EOF_TEST
+
+test_diff_funcname 'cpp: class definition derived' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+class RIGHT :
+EOF_HUNK
+class RIGHT :
+ public Baseclass
+{
+ int ChangeMe;
+};
+EOF_TEST
+
+test_diff_funcname 'cpp: class destructor' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+RIGHT::~RIGHT()
+EOF_HUNK
+RIGHT::~RIGHT()
+{
+ ChangeMe;
+}
+EOF_TEST
+
+test_diff_funcname 'cpp: function returning global type' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+::Item get::it::RIGHT()
+EOF_HUNK
+::Item get::it::RIGHT()
+{
+ ChangeMe;
+}
+EOF_TEST
+
+test_diff_funcname 'cpp: function returning nested' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+get::Item get::it::RIGHT()
+EOF_HUNK
+get::Item get::it::RIGHT()
+{
+ ChangeMe;
+}
+
+EOF_TEST
+
+test_diff_funcname 'cpp: function returning pointer' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+const char *get_it_RIGHT(char *ptr)
+EOF_HUNK
+const char *get_it_RIGHT(char *ptr)
+{
+ ChangeMe;
+}
+EOF_TEST
+
+test_diff_funcname 'cpp: function returning reference' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+string& get::it::RIGHT(char *ptr)
+EOF_HUNK
+string& get::it::RIGHT(char *ptr)
+{
+ ChangeMe;
+}
+EOF_TEST
+
+test_diff_funcname 'cpp: gnu style function' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+RIGHT(int arg)
+EOF_HUNK
+const char *
+RIGHT(int arg)
+{
+ ChangeMe;
+}
+EOF_TEST
+
+test_diff_funcname 'cpp: namespace definition' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+namespace RIGHT
+EOF_HUNK
+namespace RIGHT
+{
+ ChangeMe;
+}
+EOF_TEST
+
+test_diff_funcname 'cpp: operator definition' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+Value operator+(Value LEFT, Value RIGHT)
+EOF_HUNK
+Value operator+(Value LEFT, Value RIGHT)
+{
+ ChangeMe;
+}
+EOF_TEST
+
+test_diff_funcname 'cpp: skip access specifiers' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+class RIGHT : public Baseclass
+EOF_HUNK
+class RIGHT : public Baseclass
+{
+public:
+protected:
+private:
+ void DoSomething();
+ int ChangeMe;
+};
+EOF_TEST
+
+test_diff_funcname 'cpp: skip comment block' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+struct item RIGHT(int i)
+EOF_HUNK
+struct item RIGHT(int i)
+// Do not
+// pick up
+/* these
+** comments.
+*/
+{
+ ChangeMe;
+}
+EOF_TEST
+
+test_diff_funcname 'cpp: skip labels' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+void RIGHT (void)
+EOF_HUNK
+void RIGHT (void)
+{
+repeat: // C++ comment
+next: /* C comment */
+ do_something();
+
+ ChangeMe;
+}
+EOF_TEST
+
+test_diff_funcname 'cpp: struct definition' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+struct RIGHT {
+EOF_HUNK
+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;
+};
+EOF_TEST
+
+test_diff_funcname 'cpp: struct single line' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+struct RIGHT_iterator_tag {};
+EOF_HUNK
+void wrong()
+{
+}
+
+struct RIGHT_iterator_tag {};
+
+int ChangeMe;
+EOF_TEST
+
+test_diff_funcname 'cpp: template function definition' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+template<class T> int RIGHT(T arg)
+EOF_HUNK
+template<class T> int RIGHT(T arg)
+{
+ ChangeMe;
+}
+EOF_TEST
+
+test_diff_funcname 'cpp: union definition' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+union RIGHT {
+EOF_HUNK
+union RIGHT {
+ double v;
+ int ChangeMe;
+};
+EOF_TEST
+
+test_diff_funcname 'cpp: void c function' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+void RIGHT (void)
+EOF_HUNK
+void RIGHT (void)
+{
+ ChangeMe;
+}
+EOF_TEST
deleted file mode 100644
@@ -1,4 +0,0 @@
-[class*="RIGHT"] {
- background : #000;
- border : 10px ChangeMe #C6C6C6;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-[class*="RIGHT"] {
deleted file mode 100644
@@ -1,10 +0,0 @@
-@keyframes RIGHT {
- from {
- background : #000;
- border : 10px ChangeMe #C6C6C6;
- }
- to {
- background : #fff;
- border : 10px solid #C6C6C6;
- }
-}
deleted file mode 100644
@@ -1 +0,0 @@
-@keyframes RIGHT {
deleted file mode 100644
@@ -1,5 +0,0 @@
-RIGHT label.control-label
-{
- margin-top: 10px!important;
- border : 10px ChangeMe #C6C6C6;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-RIGHT label.control-label
deleted file mode 100644
@@ -1,4 +0,0 @@
-.RIGHT {
- background : #000;
- border : 10px ChangeMe #C6C6C6;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-.RIGHT {
deleted file mode 100644
@@ -1,4 +0,0 @@
-RIGHT h1 {
-color:
-ChangeMe;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-RIGHT h1 {
deleted file mode 100644
@@ -1,5 +0,0 @@
-RIGHT a:hover {
- margin-top:
- 10px!important;
- border : 10px ChangeMe #C6C6C6;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-RIGHT a:hover {
deleted file mode 100644
@@ -1,4 +0,0 @@
-RIGHT label.control-label {
- margin-top: 10px!important;
- border : 10px ChangeMe #C6C6C6;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-RIGHT label.control-label {
deleted file mode 100644
@@ -1,4 +0,0 @@
-#RIGHT {
- background : #000;
- border : 10px ChangeMe #C6C6C6;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-#RIGHT {
deleted file mode 100644
@@ -1,6 +0,0 @@
-p.header,
-label.control-label,
-div ul#RIGHT {
- margin-top: 10px!important;
- border : 10px ChangeMe #C6C6C6;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-div ul#RIGHT {
deleted file mode 100644
@@ -1,5 +0,0 @@
-RIGHT, label.control-label {
-margin-top: 10px!important;
-padding: 0;
-border : 10px ChangeMe #C6C6C6;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-RIGHT, label.control-label {
deleted file mode 100644
@@ -1,4 +0,0 @@
-:RIGHT {
- background : #000;
- border : 10px ChangeMe #C6C6C6;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-:RIGHT {
deleted file mode 100644
@@ -1,4 +0,0 @@
-label.control, div ul#RIGHT {
- margin-top: 10px!important;
- border : 10px ChangeMe #C6C6C6;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-label.control, div ul#RIGHT {
deleted file mode 100644
@@ -1,5 +0,0 @@
-RIGHT label.control-label {
- margin:10px;
- padding:10px;
- border : 10px ChangeMe #C6C6C6;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-RIGHT label.control-label {
new file mode 100755
@@ -0,0 +1,146 @@
+#!/bin/sh
+#
+# See ../t4018-diff-funcname.sh's test_diff_funcname()
+#
+
+test_diff_funcname 'css: attribute value selector' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+[class*="RIGHT"] {
+EOF_HUNK
+[class*="RIGHT"] {
+ background : #000;
+ border : 10px ChangeMe #C6C6C6;
+}
+EOF_TEST
+
+test_diff_funcname 'css: block level @ statements' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+@keyframes RIGHT {
+EOF_HUNK
+@keyframes RIGHT {
+ from {
+ background : #000;
+ border : 10px ChangeMe #C6C6C6;
+ }
+ to {
+ background : #fff;
+ border : 10px solid #C6C6C6;
+ }
+}
+EOF_TEST
+
+test_diff_funcname 'css: brace in col 1' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+RIGHT label.control-label
+EOF_HUNK
+RIGHT label.control-label
+{
+ margin-top: 10px!important;
+ border : 10px ChangeMe #C6C6C6;
+}
+EOF_TEST
+
+test_diff_funcname 'css: class selector' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+.RIGHT {
+EOF_HUNK
+.RIGHT {
+ background : #000;
+ border : 10px ChangeMe #C6C6C6;
+}
+EOF_TEST
+
+test_diff_funcname 'css: colon eol' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+RIGHT h1 {
+EOF_HUNK
+RIGHT h1 {
+color:
+ChangeMe;
+}
+EOF_TEST
+
+test_diff_funcname 'css: colon selector' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+RIGHT a:hover {
+EOF_HUNK
+RIGHT a:hover {
+ margin-top:
+ 10px!important;
+ border : 10px ChangeMe #C6C6C6;
+}
+EOF_TEST
+
+test_diff_funcname 'css: common' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+RIGHT label.control-label {
+EOF_HUNK
+RIGHT label.control-label {
+ margin-top: 10px!important;
+ border : 10px ChangeMe #C6C6C6;
+}
+EOF_TEST
+
+test_diff_funcname 'css: id selector' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+#RIGHT {
+EOF_HUNK
+#RIGHT {
+ background : #000;
+ border : 10px ChangeMe #C6C6C6;
+}
+EOF_TEST
+
+test_diff_funcname 'css: long selector list' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+div ul#RIGHT {
+EOF_HUNK
+p.header,
+label.control-label,
+div ul#RIGHT {
+ margin-top: 10px!important;
+ border : 10px ChangeMe #C6C6C6;
+}
+EOF_TEST
+
+test_diff_funcname 'css: prop sans indent' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+RIGHT, label.control-label {
+EOF_HUNK
+RIGHT, label.control-label {
+margin-top: 10px!important;
+padding: 0;
+border : 10px ChangeMe #C6C6C6;
+}
+EOF_TEST
+
+test_diff_funcname 'css: root selector' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+:RIGHT {
+EOF_HUNK
+:RIGHT {
+ background : #000;
+ border : 10px ChangeMe #C6C6C6;
+}
+EOF_TEST
+
+test_diff_funcname 'css: short selector list' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+label.control, div ul#RIGHT {
+EOF_HUNK
+label.control, div ul#RIGHT {
+ margin-top: 10px!important;
+ border : 10px ChangeMe #C6C6C6;
+}
+EOF_TEST
+
+test_diff_funcname 'css: trailing space' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+RIGHT label.control-label {
+EOF_HUNK
+RIGHT label.control-label {
+ margin:10px;
+ padding:10px;
+ border : 10px ChangeMe #C6C6C6;
+}
+EOF_TEST
deleted file mode 100644
@@ -1 +0,0 @@
-int special, RIGHT;
old mode 100644
new mode 100755
similarity index 71%
rename from t/t4018/custom1-pattern
rename to t/t4018/custom1.sh
@@ -1,3 +1,12 @@
+#!/bin/sh
+#
+# See ../t4018-diff-funcname.sh's test_diff_funcname()
+#
+
+test_diff_funcname 'custom1: pattern' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+int special, RIGHT;
+EOF_HUNK
public class Beer
{
int special, RIGHT;
@@ -15,3 +24,4 @@ public class Beer
+ "99 bottles of beer on the wall.\n");
}
}
+EOF_TEST
deleted file mode 100644
@@ -1,8 +0,0 @@
-public class RIGHT_Beer
-{
- int special;
- public static void main(String args[])
- {
- System.out.print("ChangeMe");
- }
-}
deleted file mode 100644
@@ -1 +0,0 @@
-RIGHT_Beer
new file mode 100755
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# See ../t4018-diff-funcname.sh's test_diff_funcname()
+#
+
+test_diff_funcname 'custom2: match to end of line' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+RIGHT_Beer
+EOF_HUNK
+public class RIGHT_Beer
+{
+ int special;
+ public static void main(String args[])
+ {
+ System.out.print("ChangeMe");
+ }
+}
+EOF_TEST
deleted file mode 100644
@@ -1 +0,0 @@
-public static void main(String RIGHT[])
old mode 100644
new mode 100755
similarity index 66%
rename from t/t4018/custom3-alternation-in-pattern
rename to t/t4018/custom3.sh
@@ -1,3 +1,12 @@
+#!/bin/sh
+#
+# See ../t4018-diff-funcname.sh's test_diff_funcname()
+#
+
+test_diff_funcname 'custom3: alternation in pattern' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+public static void main(String RIGHT[])
+EOF_HUNK
public class Beer
{
int special;
@@ -15,3 +24,4 @@ public class Beer
+ "99 bottles of beer on the wall.\n");
}
}
+EOF_TEST
deleted file mode 100644
@@ -1,9 +0,0 @@
-/ {
- label_1: node1@ff00 {
- label2: RIGHT {
- vendor,some-property;
-
- ChangeMe = <0x45-30>;
- };
- };
-};
deleted file mode 100644
@@ -1 +0,0 @@
-label2: RIGHT {
deleted file mode 100644
@@ -1,8 +0,0 @@
-/ {
- label_1: node1 {
- RIGHT {
- prop-array = <1>, <4>;
- ChangeMe = <0xffeedd00>;
- };
- };
-};
deleted file mode 100644
@@ -1 +0,0 @@
-RIGHT {
deleted file mode 100644
@@ -1,8 +0,0 @@
-/ {
- label_1: node1@ff00 {
- RIGHT@deadf00,4000 {
- #size-cells = <1>;
- ChangeMe = <0xffeedd00>;
- };
- };
-};
deleted file mode 100644
@@ -1,9 +0,0 @@
-/ {
- label_1: node1@ff00 {
- RIGHT@deadf00,4000 {
- boolean-prop1;
-
- ChangeMe;
- };
- };
-};
deleted file mode 100644
@@ -1 +0,0 @@
-RIGHT@deadf00,4000 {
deleted file mode 100644
@@ -1,8 +0,0 @@
-/ {
- label_1: node1@ff00 {
- RIGHT@deadf00,4000 /* &a comment */ {
- #size-cells = <1>;
- ChangeMe = <0xffeedd00>;
- };
- };
-};
deleted file mode 100644
@@ -1 +0,0 @@
-RIGHT@deadf00,4000 /* &a comment */ {
deleted file mode 100644
@@ -1,8 +0,0 @@
-/ {
- label_1: node1@ff00 {
- RIGHT@deadf00,4000 { /* a trailing comment */
- #size-cells = <1>;
- ChangeMe = <0xffeedd00>;
- };
- };
-};
deleted file mode 100644
@@ -1 +0,0 @@
-RIGHT@deadf00,4000 { /* a trailing comment */
deleted file mode 100644
@@ -1,13 +0,0 @@
-/ {
- label_1: node1@ff00 {
- RIGHT@deadf00,4000 {
- multilineprop = <3>,
- <4>,
- <5>,
- <6>,
- <7>;
-
- ChangeMe = <0xffeedd00>;
- };
- };
-};
deleted file mode 100644
@@ -1 +0,0 @@
-RIGHT@deadf00,4000 {
deleted file mode 100644
@@ -1 +0,0 @@
-RIGHT@deadf00,4000 {
deleted file mode 100644
@@ -1,9 +0,0 @@
-&label_1 {
- TEST = <455>;
-};
-
-&RIGHT {
- vendor,some-property;
-
- ChangeMe = <0x45-30>;
-};
deleted file mode 100644
@@ -1 +0,0 @@
-&RIGHT {
deleted file mode 100644
@@ -1,5 +0,0 @@
-/ { RIGHT /* Technically just supposed to be a slash and brace */
- #size-cells = <1>;
-
- ChangeMe = <0xffeedd00>;
-};
deleted file mode 100644
@@ -1,8 +0,0 @@
-/ { RIGHT /* Technically just supposed to be a slash and brace */
- #size-cells = <1>;
-
- /* This comment should be ignored */
-
- some-property = <40+2>;
- ChangeMe = <0xffeedd00>;
-};
deleted file mode 100644
@@ -1 +0,0 @@
-/ { RIGHT /* Technically just supposed to be a slash and brace */
deleted file mode 100644
@@ -1 +0,0 @@
-/ { RIGHT /* Technically just supposed to be a slash and brace */
new file mode 100755
@@ -0,0 +1,149 @@
+#!/bin/sh
+#
+# See ../t4018-diff-funcname.sh's test_diff_funcname()
+#
+
+test_diff_funcname 'dts: labels' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+label2: RIGHT {
+EOF_HUNK
+/ {
+ label_1: node1@ff00 {
+ label2: RIGHT {
+ vendor,some-property;
+
+ ChangeMe = <0x45-30>;
+ };
+ };
+};
+EOF_TEST
+
+test_diff_funcname 'dts: node unitless' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+RIGHT {
+EOF_HUNK
+/ {
+ label_1: node1 {
+ RIGHT {
+ prop-array = <1>, <4>;
+ ChangeMe = <0xffeedd00>;
+ };
+ };
+};
+EOF_TEST
+
+test_diff_funcname 'dts: nodes' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+RIGHT@deadf00,4000 {
+EOF_HUNK
+/ {
+ label_1: node1@ff00 {
+ RIGHT@deadf00,4000 {
+ #size-cells = <1>;
+ ChangeMe = <0xffeedd00>;
+ };
+ };
+};
+EOF_TEST
+
+test_diff_funcname 'dts: nodes boolean prop' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+RIGHT@deadf00,4000 {
+EOF_HUNK
+/ {
+ label_1: node1@ff00 {
+ RIGHT@deadf00,4000 {
+ boolean-prop1;
+
+ ChangeMe;
+ };
+ };
+};
+EOF_TEST
+
+test_diff_funcname 'dts: nodes comment1' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+RIGHT@deadf00,4000 /* &a comment */ {
+EOF_HUNK
+/ {
+ label_1: node1@ff00 {
+ RIGHT@deadf00,4000 /* &a comment */ {
+ #size-cells = <1>;
+ ChangeMe = <0xffeedd00>;
+ };
+ };
+};
+EOF_TEST
+
+test_diff_funcname 'dts: nodes comment2' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+RIGHT@deadf00,4000 { /* a trailing comment */
+EOF_HUNK
+/ {
+ label_1: node1@ff00 {
+ RIGHT@deadf00,4000 { /* a trailing comment */
+ #size-cells = <1>;
+ ChangeMe = <0xffeedd00>;
+ };
+ };
+};
+EOF_TEST
+
+test_diff_funcname 'dts: nodes multiline prop' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+RIGHT@deadf00,4000 {
+EOF_HUNK
+/ {
+ label_1: node1@ff00 {
+ RIGHT@deadf00,4000 {
+ multilineprop = <3>,
+ <4>,
+ <5>,
+ <6>,
+ <7>;
+
+ ChangeMe = <0xffeedd00>;
+ };
+ };
+};
+EOF_TEST
+
+test_diff_funcname 'dts: reference' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+&RIGHT {
+EOF_HUNK
+&label_1 {
+ TEST = <455>;
+};
+
+&RIGHT {
+ vendor,some-property;
+
+ ChangeMe = <0x45-30>;
+};
+EOF_TEST
+
+test_diff_funcname 'dts: root' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+/ { RIGHT /* Technically just supposed to be a slash and brace */
+EOF_HUNK
+/ { RIGHT /* Technically just supposed to be a slash and brace */
+ #size-cells = <1>;
+
+ ChangeMe = <0xffeedd00>;
+};
+EOF_TEST
+
+test_diff_funcname 'dts: root comment' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+/ { RIGHT /* Technically just supposed to be a slash and brace */
+EOF_HUNK
+/ { RIGHT /* Technically just supposed to be a slash and brace */
+ #size-cells = <1>;
+
+ /* This comment should be ignored */
+
+ some-property = <40+2>;
+ ChangeMe = <0xffeedd00>;
+};
+EOF_TEST
deleted file mode 100644
@@ -1,5 +0,0 @@
-defmodule RIGHT do
-end
-#
-#
-# ChangeMe; do not pick up 'end' line
deleted file mode 100644
@@ -1 +0,0 @@
-defmodule RIGHT do
deleted file mode 100644
@@ -1,6 +0,0 @@
-defmodule Test do
- test "RIGHT" do
- assert true == true
- assert ChangeMe
- end
-end
deleted file mode 100644
@@ -1 +0,0 @@
-test "RIGHT" do
deleted file mode 100644
@@ -1,5 +0,0 @@
-def function(RIGHT, arg) do
- # comment
- # comment
- ChangeMe
-end
deleted file mode 100644
@@ -1 +0,0 @@
-def function(RIGHT, arg) do
deleted file mode 100644
@@ -1,5 +0,0 @@
-defmacro foo(RIGHT) do
- # Code
- # Code
- ChangeMe
-end
deleted file mode 100644
@@ -1 +0,0 @@
-defmacro foo(RIGHT) do
deleted file mode 100644
@@ -1,9 +0,0 @@
-defmodule RIGHT do
- @moduledoc """
- Foo bar
- """
-
- def ChangeMe(a) where is_map(a) do
- a
- end
-end
deleted file mode 100644
@@ -1,8 +0,0 @@
-defmodule Foo do
- def fun(RIGHT) do
- # Code
- # Code
- # Code
- ChangeMe
- end
-end
deleted file mode 100644
@@ -1 +0,0 @@
-def fun(RIGHT) do
deleted file mode 100644
@@ -1 +0,0 @@
-defmodule RIGHT do
deleted file mode 100644
@@ -1,9 +0,0 @@
-defmodule MyApp.RIGHT do
- @moduledoc """
- Foo bar
- """
-
- def ChangeMe(a) where is_map(a) do
- a
- end
-end
deleted file mode 100644
@@ -1 +0,0 @@
-defmodule MyApp.RIGHT do
deleted file mode 100644
@@ -1,5 +0,0 @@
-defp function(RIGHT, arg) do
- # comment
- # comment
- ChangeMe
-end
deleted file mode 100644
@@ -1 +0,0 @@
-defp function(RIGHT, arg) do
deleted file mode 100644
@@ -1,6 +0,0 @@
-defprotocol RIGHT do
- @doc """
- Calculates the size (and not the length!) of a data structure
- """
- def size(data, ChangeMe)
-end
deleted file mode 100644
@@ -1,5 +0,0 @@
-defimpl RIGHT do
- # Docs
- # Docs
- def foo(ChangeMe), do: :ok
-end
deleted file mode 100644
@@ -1 +0,0 @@
-defimpl RIGHT do
deleted file mode 100644
@@ -1 +0,0 @@
-defprotocol RIGHT do
new file mode 100755
@@ -0,0 +1,127 @@
+#!/bin/sh
+#
+# See ../t4018-diff-funcname.sh's test_diff_funcname()
+#
+
+test_diff_funcname 'elixir: do not pick end' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+defmodule RIGHT do
+EOF_HUNK
+defmodule RIGHT do
+end
+#
+#
+# ChangeMe; do not pick up 'end' line
+EOF_TEST
+
+test_diff_funcname 'elixir: ex unit test' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+test "RIGHT" do
+EOF_HUNK
+defmodule Test do
+ test "RIGHT" do
+ assert true == true
+ assert ChangeMe
+ end
+end
+EOF_TEST
+
+test_diff_funcname 'elixir: function' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+def function(RIGHT, arg) do
+EOF_HUNK
+def function(RIGHT, arg) do
+ # comment
+ # comment
+ ChangeMe
+end
+EOF_TEST
+
+test_diff_funcname 'elixir: macro' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+defmacro foo(RIGHT) do
+EOF_HUNK
+defmacro foo(RIGHT) do
+ # Code
+ # Code
+ ChangeMe
+end
+EOF_TEST
+
+test_diff_funcname 'elixir: module' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+defmodule RIGHT do
+EOF_HUNK
+defmodule RIGHT do
+ @moduledoc """
+ Foo bar
+ """
+
+ def ChangeMe(a) where is_map(a) do
+ a
+ end
+end
+EOF_TEST
+
+test_diff_funcname 'elixir: module func' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+def fun(RIGHT) do
+EOF_HUNK
+defmodule Foo do
+ def fun(RIGHT) do
+ # Code
+ # Code
+ # Code
+ ChangeMe
+ end
+end
+EOF_TEST
+
+test_diff_funcname 'elixir: nested module' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+defmodule MyApp.RIGHT do
+EOF_HUNK
+defmodule MyApp.RIGHT do
+ @moduledoc """
+ Foo bar
+ """
+
+ def ChangeMe(a) where is_map(a) do
+ a
+ end
+end
+EOF_TEST
+
+test_diff_funcname 'elixir: private function' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+defp function(RIGHT, arg) do
+EOF_HUNK
+defp function(RIGHT, arg) do
+ # comment
+ # comment
+ ChangeMe
+end
+EOF_TEST
+
+test_diff_funcname 'elixir: protocol' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+defprotocol RIGHT do
+EOF_HUNK
+defprotocol RIGHT do
+ @doc """
+ Calculates the size (and not the length!) of a data structure
+ """
+ def size(data, ChangeMe)
+end
+EOF_TEST
+
+test_diff_funcname 'elixir: protocol implementation' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+defimpl RIGHT do
+EOF_HUNK
+defimpl RIGHT do
+ # Docs
+ # Docs
+ def foo(ChangeMe), do: :ok
+end
+EOF_TEST
deleted file mode 100644
@@ -1,5 +0,0 @@
- BLOCK DATA RIGHT
-
- COMMON /B/ C, ChangeMe
- DATA C, ChangeMe / 2.0, 6.0 /
- END
deleted file mode 100644
@@ -1 +0,0 @@
-BLOCK DATA RIGHT
deleted file mode 100644
@@ -1,13 +0,0 @@
- module a
-
- contains
-
- ! subroutine wrong
- subroutine RIGHT
- ! subroutine wrong
-
- real ChangeMe
-
- end subroutine RIGHT
-
- end module a
deleted file mode 100644
@@ -1,14 +0,0 @@
- 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
deleted file mode 100644
@@ -1 +0,0 @@
-subroutine RIGHT (funcA, funcB)
deleted file mode 100644
@@ -1,13 +0,0 @@
- module a
-
- contains
-
-C subroutine wrong
- subroutine RIGHT
-C subroutine wrong
-
- real ChangeMe
-
- end subroutine RIGHT
-
- end module a
deleted file mode 100644
@@ -1,13 +0,0 @@
- module a
-
- contains
-
-* subroutine wrong
- subroutine RIGHT
-* subroutine wrong
-
- real ChangeMe
-
- end subroutine RIGHT
-
- end module a
deleted file mode 100644
@@ -1 +0,0 @@
-subroutine RIGHT
deleted file mode 100644
@@ -1 +0,0 @@
-subroutine RIGHT
deleted file mode 100644
@@ -1 +0,0 @@
-subroutine RIGHT
deleted file mode 100644
@@ -1,9 +0,0 @@
-function RIGHT(a, b) result(c)
-
-integer, intent(in) :: ChangeMe
-integer, intent(in) :: b
-integer, intent(out) :: c
-
-c = a+b
-
-end function RIGHT
deleted file mode 100644
@@ -1 +0,0 @@
-function RIGHT(a, b) result(c)
deleted file mode 100644
@@ -1,5 +0,0 @@
-subroutine RIGHT
-
-real ChangeMe
-
-end subroutine RIGHT
deleted file mode 100644
@@ -1 +0,0 @@
-subroutine RIGHT
deleted file mode 100644
@@ -1,5 +0,0 @@
-module RIGHT
-
-use ChangeMe
-
-end module RIGHT
deleted file mode 100644
@@ -1,13 +0,0 @@
- module RIGHT
-
- implicit none
- private
-
- interface letters ! generic interface
- module procedure aaaa, &
- bbbb, &
- ChangeMe, &
- dddd
- end interface
-
-end module RIGHT
deleted file mode 100644
@@ -1 +0,0 @@
-module RIGHT
deleted file mode 100644
@@ -1 +0,0 @@
-module RIGHT
deleted file mode 100644
@@ -1,5 +0,0 @@
-program RIGHT
-
-call ChangeMe
-
-end program RIGHT
deleted file mode 100644
@@ -1 +0,0 @@
-program RIGHT
new file mode 100755
@@ -0,0 +1,159 @@
+#!/bin/sh
+#
+# See ../t4018-diff-funcname.sh's test_diff_funcname()
+#
+
+test_diff_funcname 'fortran: block data' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+BLOCK DATA RIGHT
+EOF_HUNK
+ BLOCK DATA RIGHT
+
+ COMMON /B/ C, ChangeMe
+ DATA C, ChangeMe / 2.0, 6.0 /
+ END
+EOF_TEST
+
+test_diff_funcname 'fortran: comment' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+subroutine RIGHT
+EOF_HUNK
+ module a
+
+ contains
+
+ ! subroutine wrong
+ subroutine RIGHT
+ ! subroutine wrong
+
+ real ChangeMe
+
+ end subroutine RIGHT
+
+ end module a
+EOF_TEST
+
+test_diff_funcname 'fortran: comment keyword' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+subroutine RIGHT (funcA, funcB)
+EOF_HUNK
+ 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
+EOF_TEST
+
+test_diff_funcname 'fortran: comment legacy' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+subroutine RIGHT
+EOF_HUNK
+ module a
+
+ contains
+
+C subroutine wrong
+ subroutine RIGHT
+C subroutine wrong
+
+ real ChangeMe
+
+ end subroutine RIGHT
+
+ end module a
+EOF_TEST
+
+test_diff_funcname 'fortran: comment legacy star' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+subroutine RIGHT
+EOF_HUNK
+ module a
+
+ contains
+
+* subroutine wrong
+ subroutine RIGHT
+* subroutine wrong
+
+ real ChangeMe
+
+ end subroutine RIGHT
+
+ end module a
+EOF_TEST
+
+test_diff_funcname 'fortran: external function' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+function RIGHT(a, b) result(c)
+EOF_HUNK
+function RIGHT(a, b) result(c)
+
+integer, intent(in) :: ChangeMe
+integer, intent(in) :: b
+integer, intent(out) :: c
+
+c = a+b
+
+end function RIGHT
+EOF_TEST
+
+test_diff_funcname 'fortran: external subroutine' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+subroutine RIGHT
+EOF_HUNK
+subroutine RIGHT
+
+real ChangeMe
+
+end subroutine RIGHT
+EOF_TEST
+
+test_diff_funcname 'fortran: module' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+module RIGHT
+EOF_HUNK
+module RIGHT
+
+use ChangeMe
+
+end module RIGHT
+EOF_TEST
+
+test_diff_funcname 'fortran: module procedure' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+module RIGHT
+EOF_HUNK
+ module RIGHT
+
+ implicit none
+ private
+
+ interface letters ! generic interface
+ module procedure aaaa, &
+ bbbb, &
+ ChangeMe, &
+ dddd
+ end interface
+
+end module RIGHT
+EOF_TEST
+
+test_diff_funcname 'fortran: program' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+program RIGHT
+EOF_HUNK
+program RIGHT
+
+call ChangeMe
+
+end program RIGHT
+EOF_TEST
deleted file mode 100644
@@ -1,4 +0,0 @@
-EXT. STREET RIGHT OUTSIDE - DAY
-
-CHARACTER
-You didn't say the magic phrase, "ChangeMe".
deleted file mode 100644
@@ -1 +0,0 @@
-EXT. STREET RIGHT OUTSIDE - DAY
new file mode 100755
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# See ../t4018-diff-funcname.sh's test_diff_funcname()
+#
+
+test_diff_funcname 'fountain: scene' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+EXT. STREET RIGHT OUTSIDE - DAY
+EOF_HUNK
+EXT. STREET RIGHT OUTSIDE - DAY
+
+CHARACTER
+You didn't say the magic phrase, "ChangeMe".
+EOF_TEST
deleted file mode 100644
@@ -1,8 +0,0 @@
-type Test struct {
- a Type
-}
-
-func (t *Test) RIGHT(a Type) (Type, error) {
- t.a = a
- return ChangeMe, nil
-}
deleted file mode 100644
@@ -1 +0,0 @@
-func (t *Test) RIGHT(a Type) (Type, error) {
deleted file mode 100644
@@ -1,4 +0,0 @@
-func RIGHT() {
- a := 5
- b := ChangeMe
-}
deleted file mode 100644
@@ -1 +0,0 @@
-func RIGHT() {
deleted file mode 100644
@@ -1,4 +0,0 @@
-type RIGHT interface {
- a() Type
- b() ChangeMe
-}
deleted file mode 100644
@@ -1 +0,0 @@
-type RIGHT interface {
deleted file mode 100644
@@ -1,5 +0,0 @@
-func RIGHT(aVeryVeryVeryLongVariableName AVeryVeryVeryLongType,
- anotherLongVariableName AnotherLongType) {
- a := 5
- b := ChangeMe
-}
deleted file mode 100644
@@ -1 +0,0 @@
-func RIGHT(aVeryVeryVeryLongVariableName AVeryVeryVeryLongType,
deleted file mode 100644
@@ -1,4 +0,0 @@
-type RIGHT struct {
- a Type
- b ChangeMe
-}
deleted file mode 100644
@@ -1 +0,0 @@
-type RIGHT struct {
new file mode 100755
@@ -0,0 +1,59 @@
+#!/bin/sh
+#
+# See ../t4018-diff-funcname.sh's test_diff_funcname()
+#
+
+test_diff_funcname 'golang: complex function' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+func (t *Test) RIGHT(a Type) (Type, error) {
+EOF_HUNK
+type Test struct {
+ a Type
+}
+
+func (t *Test) RIGHT(a Type) (Type, error) {
+ t.a = a
+ return ChangeMe, nil
+}
+EOF_TEST
+
+test_diff_funcname 'golang: func' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+func RIGHT() {
+EOF_HUNK
+func RIGHT() {
+ a := 5
+ b := ChangeMe
+}
+EOF_TEST
+
+test_diff_funcname 'golang: interface' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+type RIGHT interface {
+EOF_HUNK
+type RIGHT interface {
+ a() Type
+ b() ChangeMe
+}
+EOF_TEST
+
+test_diff_funcname 'golang: long func' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+func RIGHT(aVeryVeryVeryLongVariableName AVeryVeryVeryLongType,
+EOF_HUNK
+func RIGHT(aVeryVeryVeryLongVariableName AVeryVeryVeryLongType,
+ anotherLongVariableName AnotherLongType) {
+ a := 5
+ b := ChangeMe
+}
+EOF_TEST
+
+test_diff_funcname 'golang: struct' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+type RIGHT struct {
+EOF_HUNK
+type RIGHT struct {
+ a Type
+ b ChangeMe
+}
+EOF_TEST
deleted file mode 100644
@@ -1,8 +0,0 @@
-public class Beer
-{
- int special;
- public static void main(String RIGHT[])
- {
- System.out.print("ChangeMe");
- }
-}
deleted file mode 100644
@@ -1 +0,0 @@
-public static void main(String RIGHT[])
new file mode 100755
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# See ../t4018-diff-funcname.sh's test_diff_funcname()
+#
+
+test_diff_funcname 'java: class member function' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+public static void main(String RIGHT[])
+EOF_HUNK
+public class Beer
+{
+ int special;
+ public static void main(String RIGHT[])
+ {
+ System.out.print("ChangeMe");
+ }
+}
+EOF_TEST
deleted file mode 100644
@@ -1,6 +0,0 @@
-Indented headings are allowed, as long as the indent is no more than 3 spaces.
-
- ### RIGHT
-
-- something
-- ChangeMe
deleted file mode 100644
@@ -1 +0,0 @@
- ### RIGHT
deleted file mode 100644
@@ -1,17 +0,0 @@
-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
deleted file mode 100644
@@ -1 +0,0 @@
-# RIGHT
new file mode 100755
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# See ../t4018-diff-funcname.sh's test_diff_funcname()
+#
+
+test_diff_funcname 'markdown: heading indented' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+ ### RIGHT
+EOF_HUNK
+Indented headings are allowed, as long as the indent is no more than 3 spaces.
+
+ ### RIGHT
+
+- something
+- ChangeMe
+EOF_TEST
+
+test_diff_funcname 'markdown: heading non headings' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+# RIGHT
+EOF_HUNK
+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
+EOF_TEST
deleted file mode 100644
@@ -1,5 +0,0 @@
-classdef RIGHT
- properties
- ChangeMe
- end
-end
deleted file mode 100644
@@ -1 +0,0 @@
-classdef RIGHT
deleted file mode 100644
@@ -1,4 +0,0 @@
-function y = RIGHT()
-x = 5;
-y = ChangeMe + x;
-end
deleted file mode 100644
@@ -1 +0,0 @@
-function y = RIGHT()
deleted file mode 100644
@@ -1,3 +0,0 @@
-%%% RIGHT section
-# this is octave script
-ChangeMe = 1;
deleted file mode 100644
@@ -1 +0,0 @@
-%%% RIGHT section
deleted file mode 100644
@@ -1,3 +0,0 @@
-## RIGHT section
-# this is octave script
-ChangeMe = 1;
deleted file mode 100644
@@ -1 +0,0 @@
-## RIGHT section
deleted file mode 100644
@@ -1,3 +0,0 @@
-%% RIGHT section
-% this is understood by both matlab and octave
-ChangeMe = 1;
deleted file mode 100644
@@ -1 +0,0 @@
-%% RIGHT section
new file mode 100755
@@ -0,0 +1,52 @@
+#!/bin/sh
+#
+# See ../t4018-diff-funcname.sh's test_diff_funcname()
+#
+
+test_diff_funcname 'matlab: class definition' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+classdef RIGHT
+EOF_HUNK
+classdef RIGHT
+ properties
+ ChangeMe
+ end
+end
+EOF_TEST
+
+test_diff_funcname 'matlab: function' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+function y = RIGHT()
+EOF_HUNK
+function y = RIGHT()
+x = 5;
+y = ChangeMe + x;
+end
+EOF_TEST
+
+test_diff_funcname 'matlab: octave section 1' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+%%% RIGHT section
+EOF_HUNK
+%%% RIGHT section
+# this is octave script
+ChangeMe = 1;
+EOF_TEST
+
+test_diff_funcname 'matlab: octave section 2' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+## RIGHT section
+EOF_HUNK
+## RIGHT section
+# this is octave script
+ChangeMe = 1;
+EOF_TEST
+
+test_diff_funcname 'matlab: section' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+%% RIGHT section
+EOF_HUNK
+%% RIGHT section
+% this is understood by both matlab and octave
+ChangeMe = 1;
+EOF_TEST
deleted file mode 100644
@@ -1,8 +0,0 @@
-sub RIGHTwithheredocument {
- print <<"EOF"
-decoy here-doc
-EOF
- # some lines of context
- # to pad it out
- print "ChangeMe\n";
-}
deleted file mode 100644
@@ -1 +0,0 @@
-sub RIGHTwithheredocument {
deleted file mode 100644
@@ -1,10 +0,0 @@
-package RIGHT;
-
-use strict;
-use warnings;
-use parent qw(Exporter);
-our @EXPORT_OK = qw(round finalround);
-
-sub other; # forward declaration
-
-# ChangeMe
deleted file mode 100644
@@ -1 +0,0 @@
-package RIGHT;
deleted file mode 100644
@@ -1,18 +0,0 @@
-=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
deleted file mode 100644
@@ -1 +0,0 @@
-=head1 SYNOPSIS_RIGHT
deleted file mode 100644
@@ -1,4 +0,0 @@
-sub RIGHT {
- my ($n) = @_;
- print "ChangeMe";
-}
deleted file mode 100644
@@ -1,4 +0,0 @@
-sub RIGHT
-{
- print "ChangeMe\n";
-}
deleted file mode 100644
@@ -1 +0,0 @@
-sub RIGHT
deleted file mode 100644
@@ -1 +0,0 @@
-sub RIGHT {
new file mode 100755
@@ -0,0 +1,78 @@
+#!/bin/sh
+#
+# See ../t4018-diff-funcname.sh's test_diff_funcname()
+#
+
+test_diff_funcname 'perl: skip end of heredoc' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+sub RIGHTwithheredocument {
+EOF_HUNK
+sub RIGHTwithheredocument {
+ print <<"EOF"
+decoy here-doc
+EOF
+ # some lines of context
+ # to pad it out
+ print "ChangeMe\n";
+}
+EOF_TEST
+
+test_diff_funcname 'perl: skip forward decl' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+package RIGHT;
+EOF_HUNK
+package RIGHT;
+
+use strict;
+use warnings;
+use parent qw(Exporter);
+our @EXPORT_OK = qw(round finalround);
+
+sub other; # forward declaration
+
+# ChangeMe
+EOF_TEST
+
+test_diff_funcname 'perl: skip sub in pod' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+=head1 SYNOPSIS_RIGHT
+EOF_HUNK
+=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
+EOF_TEST
+
+test_diff_funcname 'perl: sub definition' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+sub RIGHT {
+EOF_HUNK
+sub RIGHT {
+ my ($n) = @_;
+ print "ChangeMe";
+}
+EOF_TEST
+
+test_diff_funcname 'perl: sub definition kr brace' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+sub RIGHT
+EOF_HUNK
+sub RIGHT
+{
+ print "ChangeMe\n";
+}
+EOF_TEST
deleted file mode 100644
@@ -1,4 +0,0 @@
-abstract class RIGHT
-{
- const FOO = 'ChangeMe';
-}
deleted file mode 100644
@@ -1 +0,0 @@
-abstract class RIGHT
deleted file mode 100644
@@ -1,7 +0,0 @@
-abstract class Klass
-{
- abstract public function RIGHT(): ?string
- {
- return 'ChangeMe';
- }
-}
deleted file mode 100644
@@ -1 +0,0 @@
-abstract public function RIGHT(): ?string
deleted file mode 100644
@@ -1,4 +0,0 @@
-class RIGHT
-{
- const FOO = 'ChangeMe';
-}
deleted file mode 100644
@@ -1 +0,0 @@
-class RIGHT
deleted file mode 100644
@@ -1,4 +0,0 @@
-final class RIGHT
-{
- const FOO = 'ChangeMe';
-}
deleted file mode 100644
@@ -1 +0,0 @@
-final class RIGHT
deleted file mode 100644
@@ -1,7 +0,0 @@
-class Klass
-{
- final public function RIGHT(): string
- {
- return 'ChangeMe';
- }
-}
deleted file mode 100644
@@ -1 +0,0 @@
-final public function RIGHT(): string
deleted file mode 100644
@@ -1,4 +0,0 @@
-function RIGHT()
-{
- return 'ChangeMe';
-}
deleted file mode 100644
@@ -1 +0,0 @@
-function RIGHT()
deleted file mode 100644
@@ -1,4 +0,0 @@
-interface RIGHT
-{
- public function foo($ChangeMe);
-}
deleted file mode 100644
@@ -1 +0,0 @@
-interface RIGHT
deleted file mode 100644
@@ -1,7 +0,0 @@
-class Klass
-{
- public static function RIGHT()
- {
- return 'ChangeMe';
- }
-}
deleted file mode 100644
@@ -1 +0,0 @@
-public static function RIGHT()
deleted file mode 100644
@@ -1,7 +0,0 @@
-trait RIGHT
-{
- public function foo($ChangeMe)
- {
- return 'foo';
- }
-}
deleted file mode 100644
@@ -1 +0,0 @@
-trait RIGHT
new file mode 100755
@@ -0,0 +1,106 @@
+#!/bin/sh
+#
+# See ../t4018-diff-funcname.sh's test_diff_funcname()
+#
+
+test_diff_funcname 'php: abstract class' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+abstract class RIGHT
+EOF_HUNK
+abstract class RIGHT
+{
+ const FOO = 'ChangeMe';
+}
+EOF_TEST
+
+test_diff_funcname 'php: abstract method' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+abstract public function RIGHT(): ?string
+EOF_HUNK
+abstract class Klass
+{
+ abstract public function RIGHT(): ?string
+ {
+ return 'ChangeMe';
+ }
+}
+EOF_TEST
+
+test_diff_funcname 'php: class' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+class RIGHT
+EOF_HUNK
+class RIGHT
+{
+ const FOO = 'ChangeMe';
+}
+EOF_TEST
+
+test_diff_funcname 'php: final class' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+final class RIGHT
+EOF_HUNK
+final class RIGHT
+{
+ const FOO = 'ChangeMe';
+}
+EOF_TEST
+
+test_diff_funcname 'php: final method' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+final public function RIGHT(): string
+EOF_HUNK
+class Klass
+{
+ final public function RIGHT(): string
+ {
+ return 'ChangeMe';
+ }
+}
+EOF_TEST
+
+test_diff_funcname 'php: function' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+function RIGHT()
+EOF_HUNK
+function RIGHT()
+{
+ return 'ChangeMe';
+}
+EOF_TEST
+
+test_diff_funcname 'php: interface' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+interface RIGHT
+EOF_HUNK
+interface RIGHT
+{
+ public function foo($ChangeMe);
+}
+EOF_TEST
+
+test_diff_funcname 'php: method' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+public static function RIGHT()
+EOF_HUNK
+class Klass
+{
+ public static function RIGHT()
+ {
+ return 'ChangeMe';
+ }
+}
+EOF_TEST
+
+test_diff_funcname 'php: trait' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+trait RIGHT
+EOF_HUNK
+trait RIGHT
+{
+ public function foo($ChangeMe)
+ {
+ return 'foo';
+ }
+}
+EOF_TEST
deleted file mode 100644
@@ -1,4 +0,0 @@
-async def RIGHT(pi: int = 3.14):
- while True:
- break
- return ChangeMe()
deleted file mode 100644
@@ -1 +0,0 @@
-async def RIGHT(pi: int = 3.14):
deleted file mode 100644
@@ -1,4 +0,0 @@
-class RIGHT(int, str):
- # comment
- # another comment
- # ChangeMe
deleted file mode 100644
@@ -1 +0,0 @@
-class RIGHT(int, str):
deleted file mode 100644
@@ -1,4 +0,0 @@
-def RIGHT(pi: int = 3.14):
- while True:
- break
- return ChangeMe()
deleted file mode 100644
@@ -1 +0,0 @@
-def RIGHT(pi: int = 3.14):
deleted file mode 100644
@@ -1,7 +0,0 @@
-class Foo:
- async def RIGHT(self, x: int):
- return [
- 1,
- 2,
- ChangeMe,
- ]
deleted file mode 100644
@@ -1 +0,0 @@
-async def RIGHT(self, x: int):
deleted file mode 100644
@@ -1,5 +0,0 @@
-if TYPE_CHECKING:
- class RIGHT:
- # comment
- # another comment
- # ChangeMe
deleted file mode 100644
@@ -1 +0,0 @@
-class RIGHT:
deleted file mode 100644
@@ -1,7 +0,0 @@
-class Foo:
- def RIGHT(self, x: int):
- return [
- 1,
- 2,
- ChangeMe,
- ]
deleted file mode 100644
@@ -1 +0,0 @@
-def RIGHT(self, x: int):
new file mode 100755
@@ -0,0 +1,71 @@
+#!/bin/sh
+#
+# See ../t4018-diff-funcname.sh's test_diff_funcname()
+#
+
+test_diff_funcname 'python: async def' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+async def RIGHT(pi: int = 3.14):
+EOF_HUNK
+async def RIGHT(pi: int = 3.14):
+ while True:
+ break
+ return ChangeMe()
+EOF_TEST
+
+test_diff_funcname 'python: class' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+class RIGHT(int, str):
+EOF_HUNK
+class RIGHT(int, str):
+ # comment
+ # another comment
+ # ChangeMe
+EOF_TEST
+
+test_diff_funcname 'python: def' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+def RIGHT(pi: int = 3.14):
+EOF_HUNK
+def RIGHT(pi: int = 3.14):
+ while True:
+ break
+ return ChangeMe()
+EOF_TEST
+
+test_diff_funcname 'python: indented async def' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+async def RIGHT(self, x: int):
+EOF_HUNK
+class Foo:
+ async def RIGHT(self, x: int):
+ return [
+ 1,
+ 2,
+ ChangeMe,
+ ]
+EOF_TEST
+
+test_diff_funcname 'python: indented class' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+class RIGHT:
+EOF_HUNK
+if TYPE_CHECKING:
+ class RIGHT:
+ # comment
+ # another comment
+ # ChangeMe
+EOF_TEST
+
+test_diff_funcname 'python: indented def' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+def RIGHT(self, x: int):
+EOF_HUNK
+class Foo:
+ def RIGHT(self, x: int):
+ return [
+ 1,
+ 2,
+ ChangeMe,
+ ]
+EOF_TEST
deleted file mode 100644
@@ -1,5 +0,0 @@
-pub(self) fn RIGHT<T>(x: &[T]) where T: Debug {
- let _ = x;
- // a comment
- let a = ChangeMe;
-}
deleted file mode 100644
@@ -1 +0,0 @@
-pub(self) fn RIGHT<T>(x: &[T]) where T: Debug {
deleted file mode 100644
@@ -1,5 +0,0 @@
-impl<'a, T: AsRef<[u8]>> std::RIGHT for Git<'a> {
-
- pub fn ChangeMe(&self) -> () {
- }
-}
deleted file mode 100644
@@ -1 +0,0 @@
-impl<'a, T: AsRef<[u8]>> std::RIGHT for Git<'a> {
deleted file mode 100644
@@ -1,6 +0,0 @@
-macro_rules! RIGHT {
- () => {
- // a comment
- let x = ChangeMe;
- };
-}
deleted file mode 100644
@@ -1 +0,0 @@
-macro_rules! RIGHT {
deleted file mode 100644
@@ -1,5 +0,0 @@
-#[derive(Debug)]
-pub(super) struct RIGHT<'a> {
- name: &'a str,
- age: ChangeMe,
-}
deleted file mode 100644
@@ -1 +0,0 @@
-pub(super) struct RIGHT<'a> {
deleted file mode 100644
@@ -1,5 +0,0 @@
-unsafe trait RIGHT<T> {
- fn len(&self) -> u32;
- fn ChangeMe(&self, n: u32) -> T;
- fn iter<F>(&self, f: F) where F: Fn(T);
-}
deleted file mode 100644
@@ -1 +0,0 @@
-unsafe trait RIGHT<T> {
new file mode 100755
@@ -0,0 +1,60 @@
+#!/bin/sh
+#
+# See ../t4018-diff-funcname.sh's test_diff_funcname()
+#
+
+test_diff_funcname 'rust: fn' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+pub(self) fn RIGHT<T>(x: &[T]) where T: Debug {
+EOF_HUNK
+pub(self) fn RIGHT<T>(x: &[T]) where T: Debug {
+ let _ = x;
+ // a comment
+ let a = ChangeMe;
+}
+EOF_TEST
+
+test_diff_funcname 'rust: impl' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+impl<'a, T: AsRef<[u8]>> std::RIGHT for Git<'a> {
+EOF_HUNK
+impl<'a, T: AsRef<[u8]>> std::RIGHT for Git<'a> {
+
+ pub fn ChangeMe(&self) -> () {
+ }
+}
+EOF_TEST
+
+test_diff_funcname 'rust: macro rules' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+macro_rules! RIGHT {
+EOF_HUNK
+macro_rules! RIGHT {
+ () => {
+ // a comment
+ let x = ChangeMe;
+ };
+}
+EOF_TEST
+
+test_diff_funcname 'rust: struct' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+pub(super) struct RIGHT<'a> {
+EOF_HUNK
+#[derive(Debug)]
+pub(super) struct RIGHT<'a> {
+ name: &'a str,
+ age: ChangeMe,
+}
+EOF_TEST
+
+test_diff_funcname 'rust: trait' \
+ 8<<\EOF_HUNK 9<<\EOF_TEST
+unsafe trait RIGHT<T> {
+EOF_HUNK
+unsafe trait RIGHT<T> {
+ fn len(&self) -> u32;
+ fn ChangeMe(&self, n: u32) -> T;
+ fn iter<F>(&self, f: F) where F: Fn(T);
+}
+EOF_TEST
Rewrite the hunk header test infrastructure introduced in bfa7d01413 (t4018: an infrastructure to test hunk headers, 2014-03-21). See c228a5c077 (Merge branch 'js/userdiff-cc', 2014-03-31) for the whole series that commit was part of. As noted in an earlier commit that change introduced the regression of not testing for the full hunk line, but just whether "RIGHT" appeared on it[1]. A preceding commit fixed that specific issue, but we were still left with the inflexibility of the approach described in the now-deleted t/t4018/README. I.e. to add any sort of new tests that used the existing test data we'd either need to add more files like the recently added (but now deleted) *.ctx) files, using the filesystem as our test datastructure, or introduce more parsing for the custom file format we were growing here. Let's instead just move this over to using a custom test function. This makes it trivial to add new tests by adding new optional parameters to the function. Let's still keep the relevant files in the "t/t4018/" subdirectory instead of adding ~1.5k lines (and growing) to "t/t4018-diff-funcname.sh" If this diff is viewed with "--color-moved=plain" we can see that there's no changes to the lines being moved into the new *.sh files, i.e. all the deletions are moves. I'm just adding boilerplate around those existing lines. The one-off refactoring was performed by an ad-hoc shellscript [2]. 1. https://lore.kernel.org/git/87wnvbbf2y.fsf@evledraar.gmail.com/ 2. #!/bin/sh set -ex git rm README* for t in $(git ls-files ':!*.ctx') do lang=$(echo $t | sed 's/-.*//') desc=$(echo $t | sed -E 's/^[^-]*-//' | tr - " ") if ! test -e $lang.sh then cat >$lang.sh <<-EOF #!/bin/sh # # See ../t4018-diff-funcname.sh's test_diff_funcname() # EOF else echo >>$lang.sh fi ( printf "test_diff_funcname '%s: %s' \\" "$lang" "$desc" echo printf "\t8<<%sEOF_HUNK 9<<%sEOF_TEST\n" '\' '\' cat $t.ctx printf "EOF_HUNK\n" cat $t printf "EOF_TEST\n" ) >>$lang.sh chmod +x $lang.sh git add $lang.sh git rm $t $t.ctx done Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- t/t4018-diff-funcname.sh | 59 +++-- t/t4018/README | 15 -- t/t4018/README.ctx | 1 - t/t4018/bash-arithmetic-function | 4 - t/t4018/bash-arithmetic-function.ctx | 1 - t/t4018/bash-bashism-style-compact | 6 - t/t4018/bash-bashism-style-compact.ctx | 1 - t/t4018/bash-bashism-style-function | 4 - t/t4018/bash-bashism-style-function.ctx | 1 - t/t4018/bash-bashism-style-whitespace | 4 - t/t4018/bash-bashism-style-whitespace.ctx | 1 - t/t4018/bash-conditional-function | 4 - t/t4018/bash-conditional-function.ctx | 1 - t/t4018/bash-missing-parentheses | 6 - t/t4018/bash-missing-parentheses.ctx | 1 - t/t4018/bash-mixed-style-compact | 4 - t/t4018/bash-mixed-style-compact.ctx | 1 - t/t4018/bash-mixed-style-function | 4 - t/t4018/bash-mixed-style-function.ctx | 1 - t/t4018/bash-nested-functions | 6 - t/t4018/bash-nested-functions.ctx | 1 - t/t4018/bash-other-characters | 4 - t/t4018/bash-other-characters.ctx | 1 - t/t4018/bash-posix-style-compact | 4 - t/t4018/bash-posix-style-compact.ctx | 1 - t/t4018/bash-posix-style-function | 4 - t/t4018/bash-posix-style-function.ctx | 1 - t/t4018/bash-posix-style-whitespace | 4 - t/t4018/bash-posix-style-whitespace.ctx | 1 - t/t4018/bash-subshell-function | 4 - t/t4018/bash-subshell-function.ctx | 1 - t/t4018/bash-trailing-comment | 4 - t/t4018/bash-trailing-comment.ctx | 1 - t/t4018/bash.sh | 160 ++++++++++++ t/t4018/cpp-c++-function | 4 - t/t4018/cpp-c++-function.ctx | 1 - t/t4018/cpp-class-constructor | 4 - t/t4018/cpp-class-constructor-mem-init | 5 - t/t4018/cpp-class-constructor-mem-init.ctx | 1 - t/t4018/cpp-class-constructor.ctx | 1 - t/t4018/cpp-class-definition | 4 - t/t4018/cpp-class-definition-derived | 5 - t/t4018/cpp-class-definition-derived.ctx | 1 - t/t4018/cpp-class-definition.ctx | 1 - t/t4018/cpp-class-destructor | 4 - t/t4018/cpp-class-destructor.ctx | 1 - t/t4018/cpp-function-returning-global-type | 4 - .../cpp-function-returning-global-type.ctx | 1 - t/t4018/cpp-function-returning-nested | 5 - t/t4018/cpp-function-returning-nested.ctx | 1 - t/t4018/cpp-function-returning-pointer | 4 - t/t4018/cpp-function-returning-pointer.ctx | 1 - t/t4018/cpp-function-returning-reference | 4 - t/t4018/cpp-function-returning-reference.ctx | 1 - t/t4018/cpp-gnu-style-function | 5 - t/t4018/cpp-gnu-style-function.ctx | 1 - t/t4018/cpp-namespace-definition | 4 - t/t4018/cpp-namespace-definition.ctx | 1 - t/t4018/cpp-operator-definition | 4 - t/t4018/cpp-operator-definition.ctx | 1 - t/t4018/cpp-skip-access-specifiers | 8 - t/t4018/cpp-skip-access-specifiers.ctx | 1 - t/t4018/cpp-skip-comment-block | 9 - t/t4018/cpp-skip-comment-block.ctx | 1 - t/t4018/cpp-skip-labels | 8 - t/t4018/cpp-skip-labels.ctx | 1 - t/t4018/cpp-struct-definition | 9 - t/t4018/cpp-struct-definition.ctx | 1 - t/t4018/cpp-struct-single-line | 7 - t/t4018/cpp-struct-single-line.ctx | 1 - t/t4018/cpp-template-function-definition | 4 - t/t4018/cpp-template-function-definition.ctx | 1 - t/t4018/cpp-union-definition | 4 - t/t4018/cpp-union-definition.ctx | 1 - t/t4018/cpp-void-c-function | 4 - t/t4018/cpp-void-c-function.ctx | 1 - t/t4018/cpp.sh | 239 ++++++++++++++++++ t/t4018/css-attribute-value-selector | 4 - t/t4018/css-attribute-value-selector.ctx | 1 - t/t4018/css-block-level-@-statements | 10 - t/t4018/css-block-level-@-statements.ctx | 1 - t/t4018/css-brace-in-col-1 | 5 - t/t4018/css-brace-in-col-1.ctx | 1 - t/t4018/css-class-selector | 4 - t/t4018/css-class-selector.ctx | 1 - t/t4018/css-colon-eol | 4 - t/t4018/css-colon-eol.ctx | 1 - t/t4018/css-colon-selector | 5 - t/t4018/css-colon-selector.ctx | 1 - t/t4018/css-common | 4 - t/t4018/css-common.ctx | 1 - t/t4018/css-id-selector | 4 - t/t4018/css-id-selector.ctx | 1 - t/t4018/css-long-selector-list | 6 - t/t4018/css-long-selector-list.ctx | 1 - t/t4018/css-prop-sans-indent | 5 - t/t4018/css-prop-sans-indent.ctx | 1 - t/t4018/css-root-selector | 4 - t/t4018/css-root-selector.ctx | 1 - t/t4018/css-short-selector-list | 4 - t/t4018/css-short-selector-list.ctx | 1 - t/t4018/css-trailing-space | 5 - t/t4018/css-trailing-space.ctx | 1 - t/t4018/css.sh | 146 +++++++++++ t/t4018/custom1-pattern.ctx | 1 - t/t4018/{custom1-pattern => custom1.sh} | 10 + t/t4018/custom2-match-to-end-of-line | 8 - t/t4018/custom2-match-to-end-of-line.ctx | 1 - t/t4018/custom2.sh | 18 ++ t/t4018/custom3-alternation-in-pattern.ctx | 1 - ...tom3-alternation-in-pattern => custom3.sh} | 10 + t/t4018/dts-labels | 9 - t/t4018/dts-labels.ctx | 1 - t/t4018/dts-node-unitless | 8 - t/t4018/dts-node-unitless.ctx | 1 - t/t4018/dts-nodes | 8 - t/t4018/dts-nodes-boolean-prop | 9 - t/t4018/dts-nodes-boolean-prop.ctx | 1 - t/t4018/dts-nodes-comment1 | 8 - t/t4018/dts-nodes-comment1.ctx | 1 - t/t4018/dts-nodes-comment2 | 8 - t/t4018/dts-nodes-comment2.ctx | 1 - t/t4018/dts-nodes-multiline-prop | 13 - t/t4018/dts-nodes-multiline-prop.ctx | 1 - t/t4018/dts-nodes.ctx | 1 - t/t4018/dts-reference | 9 - t/t4018/dts-reference.ctx | 1 - t/t4018/dts-root | 5 - t/t4018/dts-root-comment | 8 - t/t4018/dts-root-comment.ctx | 1 - t/t4018/dts-root.ctx | 1 - t/t4018/dts.sh | 149 +++++++++++ t/t4018/elixir-do-not-pick-end | 5 - t/t4018/elixir-do-not-pick-end.ctx | 1 - t/t4018/elixir-ex-unit-test | 6 - t/t4018/elixir-ex-unit-test.ctx | 1 - t/t4018/elixir-function | 5 - t/t4018/elixir-function.ctx | 1 - t/t4018/elixir-macro | 5 - t/t4018/elixir-macro.ctx | 1 - t/t4018/elixir-module | 9 - t/t4018/elixir-module-func | 8 - t/t4018/elixir-module-func.ctx | 1 - t/t4018/elixir-module.ctx | 1 - t/t4018/elixir-nested-module | 9 - t/t4018/elixir-nested-module.ctx | 1 - t/t4018/elixir-private-function | 5 - t/t4018/elixir-private-function.ctx | 1 - t/t4018/elixir-protocol | 6 - t/t4018/elixir-protocol-implementation | 5 - t/t4018/elixir-protocol-implementation.ctx | 1 - t/t4018/elixir-protocol.ctx | 1 - t/t4018/elixir.sh | 127 ++++++++++ t/t4018/fortran-block-data | 5 - t/t4018/fortran-block-data.ctx | 1 - t/t4018/fortran-comment | 13 - t/t4018/fortran-comment-keyword | 14 - t/t4018/fortran-comment-keyword.ctx | 1 - t/t4018/fortran-comment-legacy | 13 - t/t4018/fortran-comment-legacy-star | 13 - t/t4018/fortran-comment-legacy-star.ctx | 1 - t/t4018/fortran-comment-legacy.ctx | 1 - t/t4018/fortran-comment.ctx | 1 - t/t4018/fortran-external-function | 9 - t/t4018/fortran-external-function.ctx | 1 - t/t4018/fortran-external-subroutine | 5 - t/t4018/fortran-external-subroutine.ctx | 1 - t/t4018/fortran-module | 5 - t/t4018/fortran-module-procedure | 13 - t/t4018/fortran-module-procedure.ctx | 1 - t/t4018/fortran-module.ctx | 1 - t/t4018/fortran-program | 5 - t/t4018/fortran-program.ctx | 1 - t/t4018/fortran.sh | 159 ++++++++++++ t/t4018/fountain-scene | 4 - t/t4018/fountain-scene.ctx | 1 - t/t4018/fountain.sh | 14 + t/t4018/golang-complex-function | 8 - t/t4018/golang-complex-function.ctx | 1 - t/t4018/golang-func | 4 - t/t4018/golang-func.ctx | 1 - t/t4018/golang-interface | 4 - t/t4018/golang-interface.ctx | 1 - t/t4018/golang-long-func | 5 - t/t4018/golang-long-func.ctx | 1 - t/t4018/golang-struct | 4 - t/t4018/golang-struct.ctx | 1 - t/t4018/golang.sh | 59 +++++ t/t4018/java-class-member-function | 8 - t/t4018/java-class-member-function.ctx | 1 - t/t4018/java.sh | 18 ++ t/t4018/markdown-heading-indented | 6 - t/t4018/markdown-heading-indented.ctx | 1 - t/t4018/markdown-heading-non-headings | 17 -- t/t4018/markdown-heading-non-headings.ctx | 1 - t/t4018/markdown.sh | 39 +++ t/t4018/matlab-class-definition | 5 - t/t4018/matlab-class-definition.ctx | 1 - t/t4018/matlab-function | 4 - t/t4018/matlab-function.ctx | 1 - t/t4018/matlab-octave-section-1 | 3 - t/t4018/matlab-octave-section-1.ctx | 1 - t/t4018/matlab-octave-section-2 | 3 - t/t4018/matlab-octave-section-2.ctx | 1 - t/t4018/matlab-section | 3 - t/t4018/matlab-section.ctx | 1 - t/t4018/matlab.sh | 52 ++++ t/t4018/perl-skip-end-of-heredoc | 8 - t/t4018/perl-skip-end-of-heredoc.ctx | 1 - t/t4018/perl-skip-forward-decl | 10 - t/t4018/perl-skip-forward-decl.ctx | 1 - t/t4018/perl-skip-sub-in-pod | 18 -- t/t4018/perl-skip-sub-in-pod.ctx | 1 - t/t4018/perl-sub-definition | 4 - t/t4018/perl-sub-definition-kr-brace | 4 - t/t4018/perl-sub-definition-kr-brace.ctx | 1 - t/t4018/perl-sub-definition.ctx | 1 - t/t4018/perl.sh | 78 ++++++ t/t4018/php-abstract-class | 4 - t/t4018/php-abstract-class.ctx | 1 - t/t4018/php-abstract-method | 7 - t/t4018/php-abstract-method.ctx | 1 - t/t4018/php-class | 4 - t/t4018/php-class.ctx | 1 - t/t4018/php-final-class | 4 - t/t4018/php-final-class.ctx | 1 - t/t4018/php-final-method | 7 - t/t4018/php-final-method.ctx | 1 - t/t4018/php-function | 4 - t/t4018/php-function.ctx | 1 - t/t4018/php-interface | 4 - t/t4018/php-interface.ctx | 1 - t/t4018/php-method | 7 - t/t4018/php-method.ctx | 1 - t/t4018/php-trait | 7 - t/t4018/php-trait.ctx | 1 - t/t4018/php.sh | 106 ++++++++ t/t4018/python-async-def | 4 - t/t4018/python-async-def.ctx | 1 - t/t4018/python-class | 4 - t/t4018/python-class.ctx | 1 - t/t4018/python-def | 4 - t/t4018/python-def.ctx | 1 - t/t4018/python-indented-async-def | 7 - t/t4018/python-indented-async-def.ctx | 1 - t/t4018/python-indented-class | 5 - t/t4018/python-indented-class.ctx | 1 - t/t4018/python-indented-def | 7 - t/t4018/python-indented-def.ctx | 1 - t/t4018/python.sh | 71 ++++++ t/t4018/rust-fn | 5 - t/t4018/rust-fn.ctx | 1 - t/t4018/rust-impl | 5 - t/t4018/rust-impl.ctx | 1 - t/t4018/rust-macro-rules | 6 - t/t4018/rust-macro-rules.ctx | 1 - t/t4018/rust-struct | 5 - t/t4018/rust-struct.ctx | 1 - t/t4018/rust-trait | 5 - t/t4018/rust-trait.ctx | 1 - t/t4018/rust.sh | 60 +++++ 261 files changed, 1549 insertions(+), 879 deletions(-) delete mode 100644 t/t4018/README delete mode 100644 t/t4018/README.ctx delete mode 100644 t/t4018/bash-arithmetic-function delete mode 100644 t/t4018/bash-arithmetic-function.ctx delete mode 100644 t/t4018/bash-bashism-style-compact delete mode 100644 t/t4018/bash-bashism-style-compact.ctx delete mode 100644 t/t4018/bash-bashism-style-function delete mode 100644 t/t4018/bash-bashism-style-function.ctx delete mode 100644 t/t4018/bash-bashism-style-whitespace delete mode 100644 t/t4018/bash-bashism-style-whitespace.ctx delete mode 100644 t/t4018/bash-conditional-function delete mode 100644 t/t4018/bash-conditional-function.ctx delete mode 100644 t/t4018/bash-missing-parentheses delete mode 100644 t/t4018/bash-missing-parentheses.ctx delete mode 100644 t/t4018/bash-mixed-style-compact delete mode 100644 t/t4018/bash-mixed-style-compact.ctx delete mode 100644 t/t4018/bash-mixed-style-function delete mode 100644 t/t4018/bash-mixed-style-function.ctx delete mode 100644 t/t4018/bash-nested-functions delete mode 100644 t/t4018/bash-nested-functions.ctx delete mode 100644 t/t4018/bash-other-characters delete mode 100644 t/t4018/bash-other-characters.ctx delete mode 100644 t/t4018/bash-posix-style-compact delete mode 100644 t/t4018/bash-posix-style-compact.ctx delete mode 100644 t/t4018/bash-posix-style-function delete mode 100644 t/t4018/bash-posix-style-function.ctx delete mode 100644 t/t4018/bash-posix-style-whitespace delete mode 100644 t/t4018/bash-posix-style-whitespace.ctx delete mode 100644 t/t4018/bash-subshell-function delete mode 100644 t/t4018/bash-subshell-function.ctx delete mode 100644 t/t4018/bash-trailing-comment delete mode 100644 t/t4018/bash-trailing-comment.ctx create mode 100755 t/t4018/bash.sh delete mode 100644 t/t4018/cpp-c++-function delete mode 100644 t/t4018/cpp-c++-function.ctx delete mode 100644 t/t4018/cpp-class-constructor delete mode 100644 t/t4018/cpp-class-constructor-mem-init delete mode 100644 t/t4018/cpp-class-constructor-mem-init.ctx delete mode 100644 t/t4018/cpp-class-constructor.ctx delete mode 100644 t/t4018/cpp-class-definition delete mode 100644 t/t4018/cpp-class-definition-derived delete mode 100644 t/t4018/cpp-class-definition-derived.ctx delete mode 100644 t/t4018/cpp-class-definition.ctx delete mode 100644 t/t4018/cpp-class-destructor delete mode 100644 t/t4018/cpp-class-destructor.ctx delete mode 100644 t/t4018/cpp-function-returning-global-type delete mode 100644 t/t4018/cpp-function-returning-global-type.ctx delete mode 100644 t/t4018/cpp-function-returning-nested delete mode 100644 t/t4018/cpp-function-returning-nested.ctx delete mode 100644 t/t4018/cpp-function-returning-pointer delete mode 100644 t/t4018/cpp-function-returning-pointer.ctx delete mode 100644 t/t4018/cpp-function-returning-reference delete mode 100644 t/t4018/cpp-function-returning-reference.ctx delete mode 100644 t/t4018/cpp-gnu-style-function delete mode 100644 t/t4018/cpp-gnu-style-function.ctx delete mode 100644 t/t4018/cpp-namespace-definition delete mode 100644 t/t4018/cpp-namespace-definition.ctx delete mode 100644 t/t4018/cpp-operator-definition delete mode 100644 t/t4018/cpp-operator-definition.ctx delete mode 100644 t/t4018/cpp-skip-access-specifiers delete mode 100644 t/t4018/cpp-skip-access-specifiers.ctx delete mode 100644 t/t4018/cpp-skip-comment-block delete mode 100644 t/t4018/cpp-skip-comment-block.ctx delete mode 100644 t/t4018/cpp-skip-labels delete mode 100644 t/t4018/cpp-skip-labels.ctx delete mode 100644 t/t4018/cpp-struct-definition delete mode 100644 t/t4018/cpp-struct-definition.ctx delete mode 100644 t/t4018/cpp-struct-single-line delete mode 100644 t/t4018/cpp-struct-single-line.ctx delete mode 100644 t/t4018/cpp-template-function-definition delete mode 100644 t/t4018/cpp-template-function-definition.ctx delete mode 100644 t/t4018/cpp-union-definition delete mode 100644 t/t4018/cpp-union-definition.ctx delete mode 100644 t/t4018/cpp-void-c-function delete mode 100644 t/t4018/cpp-void-c-function.ctx create mode 100755 t/t4018/cpp.sh delete mode 100644 t/t4018/css-attribute-value-selector delete mode 100644 t/t4018/css-attribute-value-selector.ctx delete mode 100644 t/t4018/css-block-level-@-statements delete mode 100644 t/t4018/css-block-level-@-statements.ctx delete mode 100644 t/t4018/css-brace-in-col-1 delete mode 100644 t/t4018/css-brace-in-col-1.ctx delete mode 100644 t/t4018/css-class-selector delete mode 100644 t/t4018/css-class-selector.ctx delete mode 100644 t/t4018/css-colon-eol delete mode 100644 t/t4018/css-colon-eol.ctx delete mode 100644 t/t4018/css-colon-selector delete mode 100644 t/t4018/css-colon-selector.ctx delete mode 100644 t/t4018/css-common delete mode 100644 t/t4018/css-common.ctx delete mode 100644 t/t4018/css-id-selector delete mode 100644 t/t4018/css-id-selector.ctx delete mode 100644 t/t4018/css-long-selector-list delete mode 100644 t/t4018/css-long-selector-list.ctx delete mode 100644 t/t4018/css-prop-sans-indent delete mode 100644 t/t4018/css-prop-sans-indent.ctx delete mode 100644 t/t4018/css-root-selector delete mode 100644 t/t4018/css-root-selector.ctx delete mode 100644 t/t4018/css-short-selector-list delete mode 100644 t/t4018/css-short-selector-list.ctx delete mode 100644 t/t4018/css-trailing-space delete mode 100644 t/t4018/css-trailing-space.ctx create mode 100755 t/t4018/css.sh delete mode 100644 t/t4018/custom1-pattern.ctx rename t/t4018/{custom1-pattern => custom1.sh} (71%) mode change 100644 => 100755 delete mode 100644 t/t4018/custom2-match-to-end-of-line delete mode 100644 t/t4018/custom2-match-to-end-of-line.ctx create mode 100755 t/t4018/custom2.sh delete mode 100644 t/t4018/custom3-alternation-in-pattern.ctx rename t/t4018/{custom3-alternation-in-pattern => custom3.sh} (66%) mode change 100644 => 100755 delete mode 100644 t/t4018/dts-labels delete mode 100644 t/t4018/dts-labels.ctx delete mode 100644 t/t4018/dts-node-unitless delete mode 100644 t/t4018/dts-node-unitless.ctx delete mode 100644 t/t4018/dts-nodes delete mode 100644 t/t4018/dts-nodes-boolean-prop delete mode 100644 t/t4018/dts-nodes-boolean-prop.ctx delete mode 100644 t/t4018/dts-nodes-comment1 delete mode 100644 t/t4018/dts-nodes-comment1.ctx delete mode 100644 t/t4018/dts-nodes-comment2 delete mode 100644 t/t4018/dts-nodes-comment2.ctx delete mode 100644 t/t4018/dts-nodes-multiline-prop delete mode 100644 t/t4018/dts-nodes-multiline-prop.ctx delete mode 100644 t/t4018/dts-nodes.ctx delete mode 100644 t/t4018/dts-reference delete mode 100644 t/t4018/dts-reference.ctx delete mode 100644 t/t4018/dts-root delete mode 100644 t/t4018/dts-root-comment delete mode 100644 t/t4018/dts-root-comment.ctx delete mode 100644 t/t4018/dts-root.ctx create mode 100755 t/t4018/dts.sh delete mode 100644 t/t4018/elixir-do-not-pick-end delete mode 100644 t/t4018/elixir-do-not-pick-end.ctx delete mode 100644 t/t4018/elixir-ex-unit-test delete mode 100644 t/t4018/elixir-ex-unit-test.ctx delete mode 100644 t/t4018/elixir-function delete mode 100644 t/t4018/elixir-function.ctx delete mode 100644 t/t4018/elixir-macro delete mode 100644 t/t4018/elixir-macro.ctx delete mode 100644 t/t4018/elixir-module delete mode 100644 t/t4018/elixir-module-func delete mode 100644 t/t4018/elixir-module-func.ctx delete mode 100644 t/t4018/elixir-module.ctx delete mode 100644 t/t4018/elixir-nested-module delete mode 100644 t/t4018/elixir-nested-module.ctx delete mode 100644 t/t4018/elixir-private-function delete mode 100644 t/t4018/elixir-private-function.ctx delete mode 100644 t/t4018/elixir-protocol delete mode 100644 t/t4018/elixir-protocol-implementation delete mode 100644 t/t4018/elixir-protocol-implementation.ctx delete mode 100644 t/t4018/elixir-protocol.ctx create mode 100755 t/t4018/elixir.sh delete mode 100644 t/t4018/fortran-block-data delete mode 100644 t/t4018/fortran-block-data.ctx delete mode 100644 t/t4018/fortran-comment delete mode 100644 t/t4018/fortran-comment-keyword delete mode 100644 t/t4018/fortran-comment-keyword.ctx delete mode 100644 t/t4018/fortran-comment-legacy delete mode 100644 t/t4018/fortran-comment-legacy-star delete mode 100644 t/t4018/fortran-comment-legacy-star.ctx delete mode 100644 t/t4018/fortran-comment-legacy.ctx delete mode 100644 t/t4018/fortran-comment.ctx delete mode 100644 t/t4018/fortran-external-function delete mode 100644 t/t4018/fortran-external-function.ctx delete mode 100644 t/t4018/fortran-external-subroutine delete mode 100644 t/t4018/fortran-external-subroutine.ctx delete mode 100644 t/t4018/fortran-module delete mode 100644 t/t4018/fortran-module-procedure delete mode 100644 t/t4018/fortran-module-procedure.ctx delete mode 100644 t/t4018/fortran-module.ctx delete mode 100644 t/t4018/fortran-program delete mode 100644 t/t4018/fortran-program.ctx create mode 100755 t/t4018/fortran.sh delete mode 100644 t/t4018/fountain-scene delete mode 100644 t/t4018/fountain-scene.ctx create mode 100755 t/t4018/fountain.sh delete mode 100644 t/t4018/golang-complex-function delete mode 100644 t/t4018/golang-complex-function.ctx delete mode 100644 t/t4018/golang-func delete mode 100644 t/t4018/golang-func.ctx delete mode 100644 t/t4018/golang-interface delete mode 100644 t/t4018/golang-interface.ctx delete mode 100644 t/t4018/golang-long-func delete mode 100644 t/t4018/golang-long-func.ctx delete mode 100644 t/t4018/golang-struct delete mode 100644 t/t4018/golang-struct.ctx create mode 100755 t/t4018/golang.sh delete mode 100644 t/t4018/java-class-member-function delete mode 100644 t/t4018/java-class-member-function.ctx create mode 100755 t/t4018/java.sh delete mode 100644 t/t4018/markdown-heading-indented delete mode 100644 t/t4018/markdown-heading-indented.ctx delete mode 100644 t/t4018/markdown-heading-non-headings delete mode 100644 t/t4018/markdown-heading-non-headings.ctx create mode 100755 t/t4018/markdown.sh delete mode 100644 t/t4018/matlab-class-definition delete mode 100644 t/t4018/matlab-class-definition.ctx delete mode 100644 t/t4018/matlab-function delete mode 100644 t/t4018/matlab-function.ctx delete mode 100644 t/t4018/matlab-octave-section-1 delete mode 100644 t/t4018/matlab-octave-section-1.ctx delete mode 100644 t/t4018/matlab-octave-section-2 delete mode 100644 t/t4018/matlab-octave-section-2.ctx delete mode 100644 t/t4018/matlab-section delete mode 100644 t/t4018/matlab-section.ctx create mode 100755 t/t4018/matlab.sh delete mode 100644 t/t4018/perl-skip-end-of-heredoc delete mode 100644 t/t4018/perl-skip-end-of-heredoc.ctx delete mode 100644 t/t4018/perl-skip-forward-decl delete mode 100644 t/t4018/perl-skip-forward-decl.ctx delete mode 100644 t/t4018/perl-skip-sub-in-pod delete mode 100644 t/t4018/perl-skip-sub-in-pod.ctx delete mode 100644 t/t4018/perl-sub-definition delete mode 100644 t/t4018/perl-sub-definition-kr-brace delete mode 100644 t/t4018/perl-sub-definition-kr-brace.ctx delete mode 100644 t/t4018/perl-sub-definition.ctx create mode 100755 t/t4018/perl.sh delete mode 100644 t/t4018/php-abstract-class delete mode 100644 t/t4018/php-abstract-class.ctx delete mode 100644 t/t4018/php-abstract-method delete mode 100644 t/t4018/php-abstract-method.ctx delete mode 100644 t/t4018/php-class delete mode 100644 t/t4018/php-class.ctx delete mode 100644 t/t4018/php-final-class delete mode 100644 t/t4018/php-final-class.ctx delete mode 100644 t/t4018/php-final-method delete mode 100644 t/t4018/php-final-method.ctx delete mode 100644 t/t4018/php-function delete mode 100644 t/t4018/php-function.ctx delete mode 100644 t/t4018/php-interface delete mode 100644 t/t4018/php-interface.ctx delete mode 100644 t/t4018/php-method delete mode 100644 t/t4018/php-method.ctx delete mode 100644 t/t4018/php-trait delete mode 100644 t/t4018/php-trait.ctx create mode 100755 t/t4018/php.sh delete mode 100644 t/t4018/python-async-def delete mode 100644 t/t4018/python-async-def.ctx delete mode 100644 t/t4018/python-class delete mode 100644 t/t4018/python-class.ctx delete mode 100644 t/t4018/python-def delete mode 100644 t/t4018/python-def.ctx delete mode 100644 t/t4018/python-indented-async-def delete mode 100644 t/t4018/python-indented-async-def.ctx delete mode 100644 t/t4018/python-indented-class delete mode 100644 t/t4018/python-indented-class.ctx delete mode 100644 t/t4018/python-indented-def delete mode 100644 t/t4018/python-indented-def.ctx create mode 100755 t/t4018/python.sh delete mode 100644 t/t4018/rust-fn delete mode 100644 t/t4018/rust-fn.ctx delete mode 100644 t/t4018/rust-impl delete mode 100644 t/t4018/rust-impl.ctx delete mode 100644 t/t4018/rust-macro-rules delete mode 100644 t/t4018/rust-macro-rules.ctx delete mode 100644 t/t4018/rust-struct delete mode 100644 t/t4018/rust-struct.ctx delete mode 100644 t/t4018/rust-trait delete mode 100644 t/t4018/rust-trait.ctx create mode 100755 t/t4018/rust.sh