3 test_description
='test case insensitive pathspec limiting'
5 TEST_PASSES_SANITIZE_LEAK
=true
8 if test_have_prereq CASE_INSENSITIVE_FS
10 skip_all
='skipping case sensitive tests - case insensitive file system'
14 test_expect_success
'create commits with glob characters' '
15 test_commit bar bar &&
16 test_commit bAr bAr &&
17 test_commit BAR BAR &&
19 test_commit foo/bar foo/bar &&
20 test_commit foo/bAr foo/bAr &&
21 test_commit foo/BAR foo/BAR &&
23 test_commit fOo/bar fOo/bar &&
24 test_commit fOo/bAr fOo/bAr &&
25 test_commit fOo/BAR fOo/BAR &&
27 test_commit FOO/bar FOO/bar &&
28 test_commit FOO/bAr FOO/bAr &&
29 test_commit FOO/BAR FOO/BAR
32 test_expect_success
'tree_entry_interesting matches bar' '
34 git log --format=%s -- "bar" >actual &&
35 test_cmp expect actual
38 test_expect_success
'tree_entry_interesting matches :(icase)bar' '
44 git log --format=%s -- ":(icase)bar" >actual &&
45 test_cmp expect actual
48 test_expect_success
'tree_entry_interesting matches :(icase)bar with prefix' '
54 ( cd fOo && git log --format=%s -- ":(icase)bar" ) >actual &&
55 test_cmp expect actual
58 test_expect_success
'tree_entry_interesting matches :(icase)bar with empty prefix' '
70 ( cd fOo && git log --format=%s -- ":(icase)../foo/bar" ) >actual &&
71 test_cmp expect actual
74 test_expect_success
'match_pathspec matches :(icase)bar' '
80 git ls-files ":(icase)bar" >actual &&
81 test_cmp expect actual
84 test_expect_success
'match_pathspec matches :(icase)bar with prefix' '
90 ( cd fOo && git ls-files --full-name ":(icase)bar" ) >actual &&
91 test_cmp expect actual
94 test_expect_success
'match_pathspec matches :(icase)bar with empty prefix' '
101 ( cd fOo && git ls-files --full-name ":(icase)bar" ../bar ) >actual &&
102 test_cmp expect actual
105 test_expect_success
'"git diff" can take magic :(icase) pathspec' '
106 echo FOO/BAR >expect &&
107 git diff --name-only HEAD^ HEAD -- ":(icase)foo/bar" >actual &&
108 test_cmp expect actual