Robustify tilde tests.

This commit is contained in:
Ulrich Drepper 2001-08-09 17:40:23 +00:00
parent d4459f83de
commit 748945b3f6

View File

@ -324,8 +324,12 @@ ${common_objpfx}posix/globtest -q -t "$testdir" "~" |
sort >$testout
echo ~ | cmp - $testout >> $logfile || failed=1
if test $failed -ne 0; then
if test -d ~; then
echo "Tilde test failed" >> $logfile
result=1
else
echo "Tilde test could not be run" >> $logfile
fi
fi
# Test tilde expansion with trailing slash
@ -340,8 +344,12 @@ else
echo ~/ | cmp - $testout >> $logfile || failed=1
fi
if test $failed -ne 0; then
if test -d ~/; then
echo "Tilde2 test failed" >> $logfile
result=1
else
echo "Tilde2 test could not be run" >> $logfile
fi
fi
# Test tilde expansion with username
@ -351,8 +359,12 @@ ${common_objpfx}posix/globtest -q -t "$testdir" "~"$USER |
sort > $testout
eval echo ~$USER | cmp - $testout >> $logfile || failed=1
if test $failed -ne 0; then
if eval test -d ~$USER; then
echo "Tilde3 test failed" >> $logfile
result=1
else
echo "Tilde3 test could not be run" >> $logfile
fi
fi
# Tilde expansion shouldn't match a file