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.
This commit is contained in:
Lasse Collin 2022-10-19 18:54:34 +03:00
parent 82fcb7cfc1
commit ca8bf9d7c5
3 changed files with 0 additions and 25 deletions

View File

@ -13,7 +13,6 @@
if test -x ../src/xz/xz ; then if test -x ../src/xz/xz ; then
: :
else else
(exit 77)
exit 77 exit 77
fi fi
@ -21,7 +20,6 @@ fi
eval 'unset foo ; foo() { return 42; } ; foo' eval 'unset foo ; foo() { return 42; } ; foo'
if test $? != 42 ; then if test $? != 42 ; then
echo "/bin/sh doesn't support functions, skipping this test." echo "/bin/sh doesn't support functions, skipping this test."
(exit 77)
exit 77 exit 77
fi fi
@ -30,7 +28,6 @@ test_xz() {
: :
else else
echo "Compressing failed: $* $FILE" echo "Compressing failed: $* $FILE"
(exit 1)
exit 1 exit 1
fi fi
@ -38,7 +35,6 @@ test_xz() {
: :
else else
echo "Decompressing failed: $* $FILE" echo "Decompressing failed: $* $FILE"
(exit 1)
exit 1 exit 1
fi fi
@ -47,7 +43,6 @@ test_xz() {
else else
echo "Decompressed file does not match" \ echo "Decompressed file does not match" \
"the original: $* $FILE" "the original: $* $FILE"
(exit 1)
exit 1 exit 1
fi fi
@ -56,7 +51,6 @@ test_xz() {
: :
else else
echo "Decompressing failed: $* $FILE" echo "Decompressing failed: $* $FILE"
(exit 1)
exit 1 exit 1
fi fi
@ -65,7 +59,6 @@ test_xz() {
else else
echo "Decompressed file does not match" \ echo "Decompressed file does not match" \
"the original: $* $FILE" "the original: $* $FILE"
(exit 1)
exit 1 exit 1
fi fi
fi fi
@ -85,13 +78,11 @@ case $FILE in
else else
rm -f "$FILE" rm -f "$FILE"
echo "Failed to create the file '$FILE'." echo "Failed to create the file '$FILE'."
(exit 1)
exit 1 exit 1
fi fi
;; ;;
'') '')
echo "No test file was specified." echo "No test file was specified."
(exit 1)
exit 1 exit 1
;; ;;
esac esac
@ -129,5 +120,4 @@ do
test_xz $ARGS --lzma2=dict=64KiB,nice=32,mode=fast test_xz $ARGS --lzma2=dict=64KiB,nice=32,mode=fast
done done
(exit 0)
exit 0 exit 0

View File

@ -15,7 +15,6 @@ XZDEC=../src/xzdec/xzdec
test -x "$XZ" || XZ= test -x "$XZ" || XZ=
test -x "$XZDEC" || XZDEC= test -x "$XZDEC" || XZDEC=
if test -z "$XZ$XZDEC"; then if test -z "$XZ$XZDEC"; then
(exit 77)
exit 77 exit 77
fi fi
@ -25,7 +24,6 @@ do
: :
else else
echo "Good file failed: $I" echo "Good file failed: $I"
(exit 1)
exit 1 exit 1
fi fi
@ -33,7 +31,6 @@ do
: :
else else
echo "Good file failed: $I" echo "Good file failed: $I"
(exit 1)
exit 1 exit 1
fi fi
done done
@ -42,13 +39,11 @@ for I in "$srcdir"/files/bad-*.xz
do do
if test -n "$XZ" && "$XZ" -dc "$I" > /dev/null 2>&1; then if test -n "$XZ" && "$XZ" -dc "$I" > /dev/null 2>&1; then
echo "Bad file succeeded: $I" echo "Bad file succeeded: $I"
(exit 1)
exit 1 exit 1
fi fi
if test -n "$XZDEC" && "$XZDEC" "$I" > /dev/null 2>&1; then if test -n "$XZDEC" && "$XZDEC" "$I" > /dev/null 2>&1; then
echo "Bad file succeeded: $I" echo "Bad file succeeded: $I"
(exit 1)
exit 1 exit 1
fi fi
done done
@ -57,7 +52,6 @@ done
I="$srcdir/files/bad-3-index-uncomp-overflow.xz" I="$srcdir/files/bad-3-index-uncomp-overflow.xz"
if test -n "$XZ" && "$XZ" -l "$I" > /dev/null 2>&1; then if test -n "$XZ" && "$XZ" -l "$I" > /dev/null 2>&1; then
echo "Bad file succeeded with xz -l: $I" echo "Bad file succeeded with xz -l: $I"
(exit 1)
exit 1 exit 1
fi fi
@ -67,7 +61,6 @@ do
: :
else else
echo "Good file failed: $I" echo "Good file failed: $I"
(exit 1)
exit 1 exit 1
fi fi
done done
@ -76,10 +69,8 @@ for I in "$srcdir"/files/bad-*.lzma
do do
if test -n "$XZ" && "$XZ" -dc "$I" > /dev/null 2>&1; then if test -n "$XZ" && "$XZ" -dc "$I" > /dev/null 2>&1; then
echo "Bad file succeeded: $I" echo "Bad file succeeded: $I"
(exit 1)
exit 1 exit 1
fi fi
done done
(exit 0)
exit 0 exit 0

View File

@ -16,7 +16,6 @@ XZGREP=../src/scripts/xzgrep
for i in XZ XZDIFF XZGREP; do for i in XZ XZDIFF XZGREP; do
eval test -x "\$$i" && continue eval test -x "\$$i" && continue
(exit 77)
exit 77 exit 77
done done
@ -32,7 +31,6 @@ otherpostimage=$srcdir/files/good-1-lzma2-1.xz
status=$? status=$?
if test "$status" != 0 ; then if test "$status" != 0 ; then
echo "xzdiff with no changes exited with status $status != 0" echo "xzdiff with no changes exited with status $status != 0"
(exit 1)
exit 1 exit 1
fi fi
@ -40,7 +38,6 @@ fi
status=$? status=$?
if test "$status" != 1 ; then if test "$status" != 1 ; then
echo "xzdiff with changes exited with status $status != 1" echo "xzdiff with changes exited with status $status != 1"
(exit 1)
exit 1 exit 1
fi fi
@ -48,7 +45,6 @@ fi
status=$? status=$?
if test "$status" != 2 ; then if test "$status" != 2 ; then
echo "xzdiff with missing operand exited with status $status != 2" echo "xzdiff with missing operand exited with status $status != 2"
(exit 1)
exit 1 exit 1
fi fi
@ -68,9 +64,7 @@ if cmp -s "$srcdir/xzgrep_expected_output" xzgrep_test_output ; then
: :
else else
echo "unexpected output from xzgrep" echo "unexpected output from xzgrep"
(exit 1)
exit 1 exit 1
fi fi
(exit 0)
exit 0 exit 0