aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2024-03-09 10:08:32 +0800
committerJia Tan <jiat0218@gmail.com>2024-03-09 10:08:32 +0800
commit3ec6dfd656bdd40ede2a5f11e6be338988e38be4 (patch)
tree2e1c71fe48b1a487f2548253d682b2ce810c2867 /tests
parentTests: Update RISC-V test files. (diff)
downloadxz-3ec6dfd656bdd40ede2a5f11e6be338988e38be4.tar.xz
Tests: Test --single-stream can decompress bad-3-corrupt_lzma2.xz.
The first stream in this file is valid, so this tests that xz properly stops after decompressing it.
Diffstat (limited to 'tests')
-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 16cb8619..812b2152 100755
--- a/tests/test_files.sh
+++ b/tests/test_files.sh
@@ -149,6 +149,17 @@ else
exit 1
fi
+# Test that --single-stream can decompress bad-3-corrupt_lzma2.xz.
+# The first Stream in this file should decompress without errors.
+# This file cannot be decompressed with xzdec.
+I="$srcdir/files/bad-3-corrupt_lzma2.xz"
+if test -z "$XZ" || "$XZ" -dc --single-stream $NO_WARN "$I" > /dev/null; then
+ :
+else
+ echo "Good first Stream failed xz with --single-stream: $I"
+ exit 1
+fi
+
#########
# .lzma #