aboutsummaryrefslogtreecommitdiff
path: root/tests/test_scripts.sh
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2011-08-06 20:37:28 +0300
committerLasse Collin <lasse.collin@tukaani.org>2011-08-06 20:37:28 +0300
commite9ed88126eee86e2511fa42681a5c7104820cf0a (patch)
treed63350425c2f29e50cf9f953aa7f2001f5e46d68 /tests/test_scripts.sh
parentFix exit status of "xzdiff foo.xz bar.xz". (diff)
downloadxz-e9ed88126eee86e2511fa42681a5c7104820cf0a.tar.xz
Run the scripts with the correct shell in test_scripts.sh.
The scripts are now made executable in the build tree. This way the scripts can be run like programs in test_scripts.sh. Previously test_scripts.sh always used sh but it's not correct if @POSIX_SHELL@ is set to something else by configure. Thanks to Jonathan Nieder for the patch.
Diffstat (limited to '')
-rwxr-xr-xtests/test_scripts.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_scripts.sh b/tests/test_scripts.sh
index 891fc76a..293929e6 100755
--- a/tests/test_scripts.sh
+++ b/tests/test_scripts.sh
@@ -13,7 +13,7 @@
XZ=../src/xz/xz
XZDIFF=../src/scripts/xzdiff
test -x "$XZ" || XZ=
-test -r "$XZDIFF" || XZDIFF=
+test -x "$XZDIFF" || XZDIFF=
if test -z "$XZ" || test -z "$XZDIFF"; then
(exit 77)
exit 77
@@ -26,7 +26,7 @@ preimage=$srcdir/files/good-1-check-crc32.xz
samepostimage=$srcdir/files/good-1-check-crc64.xz
otherpostimage=$srcdir/files/good-1-lzma2-1.xz
-sh "$XZDIFF" "$preimage" "$samepostimage" >/dev/null
+"$XZDIFF" "$preimage" "$samepostimage" >/dev/null
status=$?
if test "$status" != 0 ; then
echo "xzdiff with no changes exited with status $status != 0"
@@ -34,7 +34,7 @@ if test "$status" != 0 ; then
exit 1
fi
-sh "$XZDIFF" "$preimage" "$otherpostimage" >/dev/null
+"$XZDIFF" "$preimage" "$otherpostimage" >/dev/null
status=$?
if test "$status" != 1 ; then
echo "xzdiff with changes exited with status $status != 1"
@@ -42,7 +42,7 @@ if test "$status" != 1 ; then
exit 1
fi
-sh "$XZDIFF" "$preimage" "$srcdir/files/missing.xz" >/dev/null 2>&1
+"$XZDIFF" "$preimage" "$srcdir/files/missing.xz" >/dev/null 2>&1
status=$?
if test "$status" != 2 ; then
echo "xzdiff with missing operand exited with status $status != 2"