t6300: add a test for --ignore-case
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>
Jeff King committed
Jul 2, 2018 at 17:11 UTC
ee0f3e22c61f73734f3caa6c3f5c7a224227ce38
1 file changed
+11
t/t6300-for-each-ref.sh
+11
@@ -795,4 +795,15 @@ test_expect_success ':remotename and :remoteref' '
795
)
796
'
797
798
+test_expect_failure 'for-each-ref --ignore-case ignores case' '
799
+ >expect &&
800
+ git for-each-ref --format="%(refname)" refs/heads/MASTER >actual &&
801
+ test_cmp expect actual &&
802
+
803
+ echo refs/heads/master >expect &&
804
+ git for-each-ref --format="%(refname)" --ignore-case \
805
+ refs/heads/MASTER >actual &&
806
+ test_cmp expect actual
807
+'
808
+
809
test_done