3 test_description
='Various filesystem issues'
7 auml
=`printf '\xc3\xa4'`
8 aumlcdiar
=`printf '\x61\xcc\x88'`
11 test_expect_success
'see if we expect ' '
13 test_case=test_expect_success
14 test_unicode=test_expect_success
16 echo good >junk/CamelCase &&
17 echo bad >junk/camelcase &&
18 if test "$(cat junk/CamelCase)" != good
20 test_case=test_expect_failure
22 say "will test on a case insensitive filesystem"
27 case "$(cd junk && echo *)" in
29 test_unicode=test_expect_failure
30 say "will test on a unicode corrupting filesystem"
37 if test "$case_insensitive"
39 test_expect_success
"detection of case insensitive filesystem during repo init" '
41 test $(git config --bool core.ignorecase) = true
44 test_expect_success
"detection of case insensitive filesystem during repo init" '
46 test_must_fail git config --bool core.ignorecase >/dev/null ||
47 test $(git config --bool core.ignorecase) = false
51 test_expect_success
"setup case tests" '
53 git config core.ignorecase true &&
56 git commit -m "initial" &&
58 git checkout -b topic &&
59 git mv camelcase tmp &&
60 git mv tmp CamelCase &&
61 git commit -m "rename" &&
62 git checkout -f master
66 $test_case 'rename (case change)' '
68 git mv camelcase CamelCase &&
69 git commit -m "rename"
73 $test_case 'merge (case change)' '
77 git reset --hard initial &&
82 $test_case 'add (with different case)' '
84 git reset --hard initial &&
88 test $(git-ls-files | grep -i camelcase | wc -l) = 1
92 test_expect_success
"setup unicode normalization tests" '
94 test_create_repo unicode &&
97 git add "$aumlcdiar" &&
100 git checkout -b topic &&
101 git mv $aumlcdiar tmp &&
102 git mv tmp "$auml" &&
103 git commit -m rename &&
104 git checkout -f master
108 $test_unicode 'rename (silent unicode normalization)' '
110 git mv "$aumlcdiar" "$auml" &&
115 $test_unicode 'merge (silent unicode normalization)' '
117 git reset --hard initial &&