aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2022-10-19 18:54:34 +0300
committerLasse Collin <lasse.collin@tukaani.org>2022-10-19 19:03:50 +0300
commitca8bf9d7c5a30be8ba1eeb106fd892f19e83ed09 (patch)
tree435c617ccbdc341ac05ca6e228c5c5c43d6a9f22
parentTests: Fix a warning in test_memlimit.c when decoders are disabled. (diff)
downloadxz-ca8bf9d7c5a30be8ba1eeb106fd892f19e83ed09.tar.xz
Test: Remove the (exit 1) lines.
I suspect that I used these in the original version because Autoconf's manual describes that such a trick is needed in some specific situations for portability reasons. None of those situations listed on Autoconf 2.71 manual apply to these test scripts though so this cleans them up.
-rwxr-xr-xtests/test_compress.sh10
-rwxr-xr-xtests/test_files.sh9
-rwxr-xr-xtests/test_scripts.sh6
3 files changed, 0 insertions, 25 deletions
diff --git a/tests/test_compress.sh b/tests/test_compress.sh
index c88799e7..a6d07c6b 100755
--- a/tests/test_compress.sh
+++ b/tests/test_compress.sh
@@ -13,7 +13,6 @@
if test -x ../src/xz/xz ; then
:
else
- (exit 77)
exit 77
fi
@@ -21,7 +20,6 @@ fi
eval 'unset foo ; foo() { return 42; } ; foo'
if test $? != 42 ; then
echo "/bin/sh doesn't support functions, skipping this test."
- (exit 77)
exit 77
fi
@@ -30,7 +28,6 @@ test_xz() {
:
else
echo "Compressing failed: $* $FILE"
- (exit 1)
exit 1
fi
@@ -38,7 +35,6 @@ test_xz() {
:
else
echo "Decompressing failed: $* $FILE"
- (exit 1)
exit 1
fi
@@ -47,7 +43,6 @@ test_xz() {
else
echo "Decompressed file does not match" \
"the original: $* $FILE"
- (exit 1)
exit 1
fi
@@ -56,7 +51,6 @@ test_xz() {
:
else
echo "Decompressing failed: $* $FILE"
- (exit 1)
exit 1
fi
@@ -65,7 +59,6 @@ test_xz() {
else
echo "Decompressed file does not match" \
"the original: $* $FILE"
- (exit 1)
exit 1
fi
fi
@@ -85,13 +78,11 @@ case $FILE in
else
rm -f "$FILE"
echo "Failed to create the file '$FILE'."
- (exit 1)
exit 1
fi
;;
'')
echo "No test file was specified."
- (exit 1)
exit 1
;;
esac
@@ -129,5 +120,4 @@ do
test_xz $ARGS --lzma2=dict=64KiB,nice=32,mode=fast
done
-(exit 0)
exit 0
diff --git a/tests/test_files.sh b/tests/test_files.sh
index 8686b6db..d770e2b6 100755
--- a/tests/test_files.sh
+++ b/tests/test_files.sh
@@ -15,7 +15,6 @@ XZDEC=../src/xzdec/xzdec
test -x "$XZ" || XZ=
test -x "$XZDEC" || XZDEC=
if test -z "$XZ$XZDEC"; then
- (exit 77)
exit 77
fi
@@ -25,7 +24,6 @@ do
:
else
echo "Good file failed: $I"
- (exit 1)
exit 1
fi
@@ -33,7 +31,6 @@ do
:
else
echo "Good file failed: $I"
- (exit 1)
exit 1
fi
done
@@ -42,13 +39,11 @@ for I in "$srcdir"/files/bad-*.xz
do
if test -n "$XZ" && "$XZ" -dc "$I" > /dev/null 2>&1; then
echo "Bad file succeeded: $I"
- (exit 1)
exit 1
fi
if test -n "$XZDEC" && "$XZDEC" "$I" > /dev/null 2>&1; then
echo "Bad file succeeded: $I"
- (exit 1)
exit 1
fi
done
@@ -57,7 +52,6 @@ done
I="$srcdir/files/bad-3-index-uncomp-overflow.xz"
if test -n "$XZ" && "$XZ" -l "$I" > /dev/null 2>&1; then
echo "Bad file succeeded with xz -l: $I"
- (exit 1)
exit 1
fi
@@ -67,7 +61,6 @@ do
:
else
echo "Good file failed: $I"
- (exit 1)
exit 1
fi
done
@@ -76,10 +69,8 @@ for I in "$srcdir"/files/bad-*.lzma
do
if test -n "$XZ" && "$XZ" -dc "$I" > /dev/null 2>&1; then
echo "Bad file succeeded: $I"
- (exit 1)
exit 1
fi
done
-(exit 0)
exit 0
diff --git a/tests/test_scripts.sh b/tests/test_scripts.sh
index 48a9308a..baa9e249 100755
--- a/tests/test_scripts.sh
+++ b/tests/test_scripts.sh
@@ -16,7 +16,6 @@ XZGREP=../src/scripts/xzgrep
for i in XZ XZDIFF XZGREP; do
eval test -x "\$$i" && continue
- (exit 77)
exit 77
done
@@ -32,7 +31,6 @@ otherpostimage=$srcdir/files/good-1-lzma2-1.xz
status=$?
if test "$status" != 0 ; then
echo "xzdiff with no changes exited with status $status != 0"
- (exit 1)
exit 1
fi
@@ -40,7 +38,6 @@ fi
status=$?
if test "$status" != 1 ; then
echo "xzdiff with changes exited with status $status != 1"
- (exit 1)
exit 1
fi
@@ -48,7 +45,6 @@ fi
status=$?
if test "$status" != 2 ; then
echo "xzdiff with missing operand exited with status $status != 2"
- (exit 1)
exit 1
fi
@@ -68,9 +64,7 @@ if cmp -s "$srcdir/xzgrep_expected_output" xzgrep_test_output ; then
:
else
echo "unexpected output from xzgrep"
- (exit 1)
exit 1
fi
-(exit 0)
exit 0