t6300: add a test for --ignore-case
authorJeff King <peff@peff.net>
Mon, 2 Jul 2018 21:11:23 +0000 (17:11 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 3 Jul 2018 21:49:13 +0000 (14:49 -0700)
The --ignore-case option was added by 3bb16a8bf2 (tag,
branch, for-each-ref: add --ignore-case for sorting and
filtering, 2016-12-04), but it was never tested. And indeed,
it does not work due to multiple bugs (which will be fixed
in subsequent patches).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6300-for-each-ref.sh
index 295d1475bde0151df65e0098e6e4a169193906ed..1adb9580b1edda08afd6035f92c05e977b40fbe3 100755 (executable)
@@ -795,4 +795,15 @@ test_expect_success ':remotename and :remoteref' '
        )
 '
 
+test_expect_failure 'for-each-ref --ignore-case ignores case' '
+       >expect &&
+       git for-each-ref --format="%(refname)" refs/heads/MASTER >actual &&
+       test_cmp expect actual &&
+
+       echo refs/heads/master >expect &&
+       git for-each-ref --format="%(refname)" --ignore-case \
+               refs/heads/MASTER >actual &&
+       test_cmp expect actual
+'
+
 test_done