3 test_description
='Various filesystem issues'
7 auml
=`printf '\xc3\xa4'`
8 aumlcdiar
=`printf '\x61\xcc\x88'`
12 test_expect_success
'see if we expect ' '
14 test_case=test_expect_success
15 test_unicode=test_expect_success
17 echo good >junk/CamelCase &&
18 echo bad >junk/camelcase &&
19 if test "$(cat junk/CamelCase)" != good
21 test_case=test_expect_failure
27 case "$(cd junk && echo *)" in
29 test_unicode=test_expect_failure
37 test "$case_insensitive" &&
38 say
"will test on a case insensitive filesystem"
40 say
"will test on a unicode corrupting filesystem"
42 if test "$case_insensitive"
44 test_expect_success
"detection of case insensitive filesystem during repo init" '
46 test $(git config --bool core.ignorecase) = true
49 test_expect_success
"detection of case insensitive filesystem during repo init" '
51 test_must_fail git config --bool core.ignorecase >/dev/null ||
52 test $(git config --bool core.ignorecase) = false
56 test_expect_success
"setup case tests" '
58 git config core.ignorecase true &&
61 git commit -m "initial" &&
63 git checkout -b topic &&
64 git mv camelcase tmp &&
65 git mv tmp CamelCase &&
66 git commit -m "rename" &&
67 git checkout -f master
71 $test_case 'rename (case change)' '
73 git mv camelcase CamelCase &&
74 git commit -m "rename"
78 $test_case 'merge (case change)' '
82 git reset --hard initial &&
87 $test_case 'add (with different case)' '
89 git reset --hard initial &&
93 test $(git ls-files | grep -i camelcase | wc -l) = 1
97 test_expect_success
"setup unicode normalization tests" '
99 test_create_repo unicode &&
101 touch "$aumlcdiar" &&
102 git add "$aumlcdiar" &&
103 git commit -m initial
105 git checkout -b topic &&
106 git mv $aumlcdiar tmp &&
107 git mv tmp "$auml" &&
108 git commit -m rename &&
109 git checkout -f master
113 $test_unicode 'rename (silent unicode normalization)' '
115 git mv "$aumlcdiar" "$auml" &&
120 $test_unicode 'merge (silent unicode normalization)' '
122 git reset --hard initial &&