Imported Upstream version 2.22.0
[platform/upstream/git.git] / t / t6130-pathspec-noglob.sh
index 4129d9f..3776023 100755 (executable)
@@ -10,7 +10,6 @@ test_expect_success 'create commits with glob characters' '
        # the name "f*" in the worktree, because it is not allowed
        # on Windows (the tests below do not depend on the presence
        # of the file in the worktree)
-       git config core.protectNTFS false &&
        git update-index --add --cacheinfo 100644 "$(git rev-parse HEAD:foo)" "f*" &&
        test_tick &&
        git commit -m star &&
@@ -98,9 +97,8 @@ test_expect_success 'no-glob option matches literally (bracket)' '
 '
 
 test_expect_success 'no-glob option disables :(literal)' '
-       : >expect &&
        git --literal-pathspecs log --format=%s -- ":(literal)foo" >actual &&
-       test_cmp expect actual
+       test_must_be_empty actual
 '
 
 test_expect_success 'no-glob environment variable works' '
@@ -131,9 +129,8 @@ test_expect_success '**/ works with :(glob)' '
 '
 
 test_expect_success '**/ does not work with --noglob-pathspecs' '
-       : >expect &&
        git --noglob-pathspecs log --format=%s -- "**/bar" >actual &&
-       test_cmp expect actual
+       test_must_be_empty actual
 '
 
 test_expect_success '**/ works with :(glob) and --noglob-pathspecs' '
@@ -155,9 +152,8 @@ test_expect_success '**/ works with --glob-pathspecs' '
 '
 
 test_expect_success '**/ does not work with :(literal) and --glob-pathspecs' '
-       : >expect &&
        git --glob-pathspecs log --format=%s -- ":(literal)**/bar" >actual &&
-       test_cmp expect actual
+       test_must_be_empty actual
 '
 
 test_done