gc: handle & check gc.reflogExpire config
[gitweb.git] / t / t3070-wildmatch.sh
index c1fc6ca7301eaa9b15ef091ce592989956efc156..891d4d7cb9f1a7d1a8caa75f30e6d4eb4ea0df14 100755 (executable)
@@ -79,12 +79,12 @@ match_with_function() {
        if test "$match_expect" = 1
        then
                test_expect_success "$match_function: match '$text' '$pattern'" "
-                       test-wildmatch $match_function '$text' '$pattern'
+                       test-tool wildmatch $match_function '$text' '$pattern'
                "
        elif test "$match_expect" = 0
        then
                test_expect_success "$match_function: no match '$text' '$pattern'" "
-                       test_must_fail test-wildmatch $match_function '$text' '$pattern'
+                       test_must_fail test-tool wildmatch $match_function '$text' '$pattern'
                "
        else
                test_expect_success "PANIC: Test framework error. Unknown matches value $match_expect" 'false'
@@ -101,8 +101,7 @@ match_with_ls_files() {
 
        match_stdout_stderr_cmp="
                tr -d '\0' <actual.raw >actual &&
-               >expect.err &&
-               test_cmp expect.err actual.err &&
+               test_must_be_empty actual.err &&
                test_cmp expect actual"
 
        if test "$match_expect" = 'E'
@@ -148,7 +147,7 @@ match_with_ls_files() {
 match() {
        if test "$#" = 6
        then
-               # When test-wildmatch and git ls-files produce the same
+               # When test-tool wildmatch and git ls-files produce the same
                # result.
                match_glob=$1
                match_file_glob=$match_glob
@@ -204,19 +203,19 @@ match() {
                fi
        '
 
-       # $1: Case sensitive glob match: test-wildmatch & ls-files
+       # $1: Case sensitive glob match: test-tool wildmatch & ls-files
        match_with_function "$text" "$pattern" $match_glob "wildmatch"
        match_with_ls_files "$text" "$pattern" $match_file_glob "wildmatch" " --glob-pathspecs"
 
-       # $2: Case insensitive glob match: test-wildmatch & ls-files
+       # $2: Case insensitive glob match: test-tool wildmatch & ls-files
        match_with_function "$text" "$pattern" $match_iglob "iwildmatch"
        match_with_ls_files "$text" "$pattern" $match_file_iglob "iwildmatch" " --glob-pathspecs --icase-pathspecs"
 
-       # $3: Case sensitive path match: test-wildmatch & ls-files
+       # $3: Case sensitive path match: test-tool wildmatch & ls-files
        match_with_function "$text" "$pattern" $match_pathmatch "pathmatch"
        match_with_ls_files "$text" "$pattern" $match_file_pathmatch "pathmatch" ""
 
-       # $4: Case insensitive path match: test-wildmatch & ls-files
+       # $4: Case insensitive path match: test-tool wildmatch & ls-files
        match_with_function "$text" "$pattern" $match_pathmatchi "ipathmatch"
        match_with_ls_files "$text" "$pattern" $match_file_pathmatchi "ipathmatch" " --icase-pathspecs"
 }
@@ -238,7 +237,7 @@ match 0 0 0 0 foobar 'foo\*bar'
 match 1 1 1 1 'f\oo' 'f\\oo'
 match 1 1 1 1 ball '*[al]?'
 match 0 0 0 0 ten '[ten]'
-match 0 0 1 1 ten '**[!te]'
+match 1 1 1 1 ten '**[!te]'
 match 0 0 0 0 ten '**[!ten]'
 match 1 1 1 1 ten 't[a-g]n'
 match 0 0 0 0 ten 't[!a-g]n'
@@ -254,7 +253,7 @@ match 1 1 1 1 ']' ']'
 # Extended slash-matching features
 match 0 0 1 1 'foo/baz/bar' 'foo*bar'
 match 0 0 1 1 'foo/baz/bar' 'foo**bar'
-match 0 0 1 1 'foobazbar' 'foo**bar'
+match 1 1 1 1 'foobazbar' 'foo**bar'
 match 1 1 1 1 'foo/baz/bar' 'foo/**/bar'
 match 1 1 0 0 'foo/baz/bar' 'foo/**/**/bar'
 match 1 1 1 1 'foo/b/a/z/bar' 'foo/**/bar'