aboutsummaryrefslogtreecommitdiff
path: root/tests/test_files.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_files.sh')
-rwxr-xr-xtests/test_files.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_files.sh b/tests/test_files.sh
index d770e2b6..17c542f5 100755
--- a/tests/test_files.sh
+++ b/tests/test_files.sh
@@ -18,6 +18,17 @@ if test -z "$XZ$XZDEC"; then
exit 77
fi
+# If decompression support is missing, this test is skipped.
+# This isn't perfect as if only some decompressors are disabled
+# then some good files might not decompress and the test fails
+# for a (kind of) wrong reason.
+if grep 'define HAVE_DECODERS' ../config.h > /dev/null ; then
+ :
+else
+ echo "Decompression support is disabled, skipping this test."
+ exit 77
+fi
+
for I in "$srcdir"/files/good-*.xz
do
if test -z "$XZ" || "$XZ" -dc "$I" > /dev/null; then