Skip to content

Commit

Permalink
Tests: Test --single-stream can decompress bad-3-corrupt_lzma2.xz.
Browse files Browse the repository at this point in the history
The first stream in this file is valid, so this tests that xz properly
stops after decompressing it.
  • Loading branch information
JiaT75 committed Mar 9, 2024
1 parent 0b4ccc9 commit a3a29bb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_files.sh
Expand Up @@ -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 #
Expand Down

0 comments on commit a3a29bb

Please sign in to comment.