summaryrefslogtreecommitdiff
path: root/t/t0050-filesystem.sh
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2012-07-26 15:39:55 +0200
committerJunio C Hamano <gitster@pobox.com>2012-07-27 10:11:06 -0700
commit2b71b5221a66abd881919dd45609285e7af5c56f (patch)
tree495ddba3746348c9bdf488cfff6f716d318ce5c0 /t/t0050-filesystem.sh
parent9a3658b97726df53453bd97add50d267f9ab2978 (diff)
downloadgit-2b71b5221a66abd881919dd45609285e7af5c56f.tar.gz
t0050: use the SYMLINKS test prereq
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0050-filesystem.sh')
-rwxr-xr-xt/t0050-filesystem.sh21
1 files changed, 7 insertions, 14 deletions
diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh
index df9498b7d0..b46ae72eac 100755
--- a/t/t0050-filesystem.sh
+++ b/t/t0050-filesystem.sh
@@ -8,7 +8,6 @@ auml=$(printf '\303\244')
aumlcdiar=$(printf '\141\314\210')
unibad=
-no_symlinks=
test_expect_success 'see what we expect' '
test_unicode=test_expect_success &&
@@ -21,13 +20,7 @@ test_expect_success 'see what we expect' '
;;
*) ;;
esac &&
- rm -fr junk &&
- {
- ln -s x y 2> /dev/null &&
- test -h y 2> /dev/null ||
- no_symlinks=1 &&
- rm -f y
- }
+ rm -fr junk
'
if test_have_prereq CASE_INSENSITIVE_FS
@@ -40,7 +33,7 @@ fi
test "$unibad" &&
say "will test on a unicode corrupting filesystem"
-test "$no_symlinks" &&
+test_have_prereq SYMLINKS ||
say "will test on a filesystem lacking symbolic links"
if test_have_prereq CASE_INSENSITIVE_FS
@@ -57,18 +50,18 @@ test_expect_success "detection of case insensitive filesystem during repo init"
'
fi
-if test "$no_symlinks"
+if test_have_prereq SYMLINKS
then
test_expect_success "detection of filesystem w/o symlink support during repo init" '
- v=$(git config --bool core.symlinks) &&
- test "$v" = false
+ test_must_fail git config --bool core.symlinks ||
+ test "$(git config --bool core.symlinks)" = true
'
else
test_expect_success "detection of filesystem w/o symlink support during repo init" '
- test_must_fail git config --bool core.symlinks ||
- test "$(git config --bool core.symlinks)" = true
+ v=$(git config --bool core.symlinks) &&
+ test "$v" = false
'
fi