t0050: use the CASE_INSENSITIVE_FS test prereq

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael J Gruber committed Jul 26, 2012 at 15:39 UTC 9a3658b97726df53453bd97add50d267f9ab2978
1 file changed +8 -13
t/t0050-filesystem.sh
+8 -13
@@ -7,23 +7,12 @@ test_description='Various filesystem issues'
7 auml=$(printf '\303\244')
8 aumlcdiar=$(printf '\141\314\210')
9
10 -case_insensitive=
10 unibad=
11 no_symlinks=
12 test_expect_success 'see what we expect' '
13
15 - test_case=test_expect_success &&
14 test_unicode=test_expect_success &&
15 mkdir junk &&
18 - echo good >junk/CamelCase &&
19 - echo bad >junk/camelcase &&
20 - if test "$(cat junk/CamelCase)" != good
21 - then
22 - test_case=test_expect_failure &&
23 - case_insensitive=t
24 - fi &&
25 - rm -fr junk &&
26 - mkdir junk &&
16 >junk/"$auml" &&
17 case "$(cd junk && echo *)" in
18 "$aumlcdiar")
@@ -41,14 +30,20 @@ test_expect_success 'see what we expect' '
30 }
31 '
32
44 -test "$case_insensitive" &&
33 +if test_have_prereq CASE_INSENSITIVE_FS
34 +then
35 say "will test on a case insensitive filesystem"
36 + test_case=test_expect_failure
37 +else
38 + test_case=test_expect_success
39 +fi
40 +
41 test "$unibad" &&
42 say "will test on a unicode corrupting filesystem"
43 test "$no_symlinks" &&
44 say "will test on a filesystem lacking symbolic links"
45
51 -if test "$case_insensitive"
46 +if test_have_prereq CASE_INSENSITIVE_FS
47 then
48 test_expect_success "detection of case insensitive filesystem during repo init" '
49