pathspec: support :(literal) syntax for noglob pathspec
[gitweb.git] / t / t6130-pathspec-noglob.sh
index 39ef61994f6a4b4bea1731002f7637232e7dd349..49c148e17efab0bc512ca09ec4a37a448f8ec1a6 100755 (executable)
@@ -47,18 +47,36 @@ test_expect_success 'no-glob option matches literally (vanilla)' '
        test_cmp expect actual
 '
 
+test_expect_success 'no-glob option matches literally (vanilla)' '
+       echo vanilla >expect &&
+       git log --format=%s -- ":(literal)foo" >actual &&
+       test_cmp expect actual
+'
+
 test_expect_success 'no-glob option matches literally (star)' '
        echo star >expect &&
        git --literal-pathspecs log --format=%s -- "f*" >actual &&
        test_cmp expect actual
 '
 
+test_expect_success 'no-glob option matches literally (star)' '
+       echo star >expect &&
+       git log --format=%s -- ":(literal)f*" >actual &&
+       test_cmp expect actual
+'
+
 test_expect_success 'no-glob option matches literally (bracket)' '
        echo bracket >expect &&
        git --literal-pathspecs log --format=%s -- "f[o][o]" >actual &&
        test_cmp expect actual
 '
 
+test_expect_success 'no-glob option matches literally (bracket)' '
+       echo bracket >expect &&
+       git log --format=%s -- ":(literal)f[o][o]" >actual &&
+       test_cmp expect actual
+'
+
 test_expect_success 'no-glob environment variable works' '
        echo star >expect &&
        GIT_LITERAL_PATHSPECS=1 git log --format=%s -- "f*" >actual &&