Skip to content

Commit 9a3658b

Browse files
Michael J Grubergitster
authored andcommitted
t0050: use the CASE_INSENSITIVE_FS test prereq
Signed-off-by: Michael J Gruber <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ac39aa6 commit 9a3658b

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

t/t0050-filesystem.sh

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,12 @@ test_description='Various filesystem issues'
77
auml=$(printf '\303\244')
88
aumlcdiar=$(printf '\141\314\210')
99

10-
case_insensitive=
1110
unibad=
1211
no_symlinks=
1312
test_expect_success 'see what we expect' '
1413
15-
test_case=test_expect_success &&
1614
test_unicode=test_expect_success &&
1715
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 &&
2716
>junk/"$auml" &&
2817
case "$(cd junk && echo *)" in
2918
"$aumlcdiar")
@@ -41,14 +30,20 @@ test_expect_success 'see what we expect' '
4130
}
4231
'
4332

44-
test "$case_insensitive" &&
33+
if test_have_prereq CASE_INSENSITIVE_FS
34+
then
4535
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+
4641
test "$unibad" &&
4742
say "will test on a unicode corrupting filesystem"
4843
test "$no_symlinks" &&
4944
say "will test on a filesystem lacking symbolic links"
5045

51-
if test "$case_insensitive"
46+
if test_have_prereq CASE_INSENSITIVE_FS
5247
then
5348
test_expect_success "detection of case insensitive filesystem during repo init" '
5449

0 commit comments

Comments
 (0)