aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2022-10-20 17:39:06 +0300
committerLasse Collin <lasse.collin@tukaani.org>2022-11-09 14:32:33 +0200
commitc8ef089c149afaab413c3a51be827dd1d11afe0e (patch)
tree238f95c82aa5bee74e37e17f10cba64ee9fe7fba /tests
parentTests: Add .lz (lzip) test files. (diff)
downloadxz-c8ef089c149afaab413c3a51be827dd1d11afe0e.tar.xz
Tests: Test the .lz files in test_files.sh.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test_files.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/test_files.sh b/tests/test_files.sh
index 6aa10d4e..ceb9197c 100755
--- a/tests/test_files.sh
+++ b/tests/test_files.sh
@@ -164,4 +164,29 @@ do
fi
done
+
+#######
+# .lz #
+#######
+
+if grep 'define HAVE_LZIP_DECODER' ../config.h > /dev/null ; then
+ for I in "$srcdir"/files/good-*.lz
+ do
+ if test -z "$XZ" || "$XZ" -dc "$I" > /dev/null; then
+ :
+ else
+ echo "Good file failed: $I"
+ exit 1
+ fi
+ done
+
+ for I in "$srcdir"/files/bad-*.lz "$srcdir"/files/unsupported-*.lz
+ do
+ if test -n "$XZ" && "$XZ" -dc "$I" > /dev/null 2>&1; then
+ echo "Bad file succeeded: $I"
+ exit 1
+ fi
+ done
+fi
+
exit "$EXIT_STATUS"