builtin-status: Add tests for submodule summary
[git/mjg.git] / t / t0050-filesystem.sh
blob3fbad77811e3782523e83dfdd58fe5308f237771
1 #!/bin/sh
3 test_description='Various filesystem issues'
5 . ./test-lib.sh
7 auml=`printf '\xc3\xa4'`
8 aumlcdiar=`printf '\x61\xcc\x88'`
10 test_expect_success 'see if we expect ' '
12 test_case=test_expect_success
13 test_unicode=test_expect_success
14 mkdir junk &&
15 echo good >junk/CamelCase &&
16 echo bad >junk/camelcase &&
17 if test "$(cat junk/CamelCase)" != good
18 then
19 test_case=test_expect_failure
20 say "will test on a case insensitive filesystem"
21 fi &&
22 rm -fr junk &&
23 mkdir junk &&
24 >junk/"$auml" &&
25 case "$(cd junk && echo *)" in
26 "$aumlcdiar")
27 test_unicode=test_expect_failure
28 say "will test on a unicode corrupting filesystem"
30 *) ;;
31 esac &&
32 rm -fr junk
35 test_expect_success "setup case tests" '
37 touch camelcase &&
38 git add camelcase &&
39 git commit -m "initial" &&
40 git tag initial &&
41 git checkout -b topic &&
42 git mv camelcase tmp &&
43 git mv tmp CamelCase &&
44 git commit -m "rename" &&
45 git checkout -f master
49 $test_case 'rename (case change)' '
51 git mv camelcase CamelCase &&
52 git commit -m "rename"
56 $test_case 'merge (case change)' '
58 git reset --hard initial &&
59 git merge topic
63 test_expect_success "setup unicode normalization tests" '
65 test_create_repo unicode &&
66 cd unicode &&
67 touch "$aumlcdiar" &&
68 git add "$aumlcdiar" &&
69 git commit -m initial
70 git tag initial &&
71 git checkout -b topic &&
72 git mv $aumlcdiar tmp &&
73 git mv tmp "$auml" &&
74 git commit -m rename &&
75 git checkout -f master
79 $test_unicode 'rename (silent unicode normalization)' '
81 git mv "$aumlcdiar" "$auml" &&
82 git commit -m rename
86 $test_unicode 'merge (silent unicode normalization)' '
88 git reset --hard initial &&
89 git merge topic
93 test_done