Skip to content

Commit

Permalink
t0050: use the CASE_INSENSITIVE_FS test prereq
Browse files Browse the repository at this point in the history
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Michael J Gruber authored and Junio C Hamano committed Jul 27, 2012
1 parent ac39aa6 commit 9a3658b
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions t/t0050-filesystem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,12 @@ test_description='Various filesystem issues'
auml=$(printf '\303\244')
aumlcdiar=$(printf '\141\314\210')

case_insensitive=
unibad=
no_symlinks=
test_expect_success 'see what we expect' '
test_case=test_expect_success &&
test_unicode=test_expect_success &&
mkdir junk &&
echo good >junk/CamelCase &&
echo bad >junk/camelcase &&
if test "$(cat junk/CamelCase)" != good
then
test_case=test_expect_failure &&
case_insensitive=t
fi &&
rm -fr junk &&
mkdir junk &&
>junk/"$auml" &&
case "$(cd junk && echo *)" in
"$aumlcdiar")
Expand All @@ -41,14 +30,20 @@ test_expect_success 'see what we expect' '
}
'

test "$case_insensitive" &&
if test_have_prereq CASE_INSENSITIVE_FS
then
say "will test on a case insensitive filesystem"
test_case=test_expect_failure
else
test_case=test_expect_success
fi

test "$unibad" &&
say "will test on a unicode corrupting filesystem"
test "$no_symlinks" &&
say "will test on a filesystem lacking symbolic links"

if test "$case_insensitive"
if test_have_prereq CASE_INSENSITIVE_FS
then
test_expect_success "detection of case insensitive filesystem during repo init" '
Expand Down

0 comments on commit 9a3658b

Please sign in to comment.