aboutsummaryrefslogtreecommitdiff
path: root/tests/files
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2024-02-23 23:09:59 +0800
committerJia Tan <jiat0218@gmail.com>2024-02-23 23:09:59 +0800
commitcf44e4b7f5dfdbf8c78aef377c10f71e274f63c0 (patch)
tree58be84ec9b547c5da6474057d0b4e70357f1ac48 /tests/files
parentTests: Add MicroLZMA test. (diff)
downloadxz-cf44e4b7f5dfdbf8c78aef377c10f71e274f63c0.tar.xz
Tests: Add a few test files.
Diffstat (limited to 'tests/files')
-rw-r--r--tests/files/README19
-rw-r--r--tests/files/bad-3-corrupt_lzma2.xzbin0 -> 484 bytes
-rw-r--r--tests/files/bad-dict_size.lzmabin0 -> 41 bytes
-rw-r--r--tests/files/good-2cat.xzbin0 -> 136 bytes
-rw-r--r--tests/files/good-large_compressed.lzmabin0 -> 35430 bytes
-rw-r--r--tests/files/good-small_compressed.lzmabin0 -> 258 bytes
6 files changed, 19 insertions, 0 deletions
diff --git a/tests/files/README b/tests/files/README
index e16ee19c..e987a519 100644
--- a/tests/files/README
+++ b/tests/files/README
@@ -41,6 +41,8 @@
good-0catpad-empty.xz has two zero-Block Streams concatenated with
four-byte Stream Padding between the Streams.
+ good-2cat.xz has two Streams with one Block each.
+
good-1-check-none.xz has one Stream with one Block with two
uncompressed LZMA2 chunks and no integrity check.
@@ -292,6 +294,11 @@
Uncompressed Size bytes of output will have been produced but
the LZMA2 decoder doesn't indicate end of stream.
+ bad-3-corrupt_lzma2.xz has three Streams in it. The first and third
+ streams are valid xz Streams. The middle Stream has a correct Stream
+ Header, Block Header, Index and Stream Footer. Only the LZMA2 data
+ is corrupt. This file should decompress if --single-stream is used.
+
3. Descriptions of Individual .lzma Files
@@ -308,6 +315,14 @@
will give an error at the end of the file after producing the
correct uncompressed output.
+ good-small_compressed.lzma was created with a small dictionary (2^16).
+ It contains the string "Hello World" repeated 100,000 times. This tests
+ match decoding and wrapping the dictionary.
+
+ good-large_compressed.lzma was created with a mix of repeated
+ characters and random data to test a data stream containing many
+ matches and many literals.
+
3.2. Bad Files
@@ -329,6 +344,10 @@
bad-too_small_size-without_eopm-3.lzma is like -1 above but instead
of a literal the problem occurs in the middle of a match.
+ bad-dict_size.lzma has a valid dictionary size according to the .lzma
+ File Format, but will be rejected by XZ Utils because it is not 2^n or
+ 2^n + 2^(n-1).
+
4. Descriptions of Individual .lz (lzip) Files
diff --git a/tests/files/bad-3-corrupt_lzma2.xz b/tests/files/bad-3-corrupt_lzma2.xz
new file mode 100644
index 00000000..926f95b0
--- /dev/null
+++ b/tests/files/bad-3-corrupt_lzma2.xz
Binary files differ
diff --git a/tests/files/bad-dict_size.lzma b/tests/files/bad-dict_size.lzma
new file mode 100644
index 00000000..f2ef5a58
--- /dev/null
+++ b/tests/files/bad-dict_size.lzma
Binary files differ
diff --git a/tests/files/good-2cat.xz b/tests/files/good-2cat.xz
new file mode 100644
index 00000000..ea4d6270
--- /dev/null
+++ b/tests/files/good-2cat.xz
Binary files differ
diff --git a/tests/files/good-large_compressed.lzma b/tests/files/good-large_compressed.lzma
new file mode 100644
index 00000000..8450fea8
--- /dev/null
+++ b/tests/files/good-large_compressed.lzma
Binary files differ
diff --git a/tests/files/good-small_compressed.lzma b/tests/files/good-small_compressed.lzma
new file mode 100644
index 00000000..a2fe8022
--- /dev/null
+++ b/tests/files/good-small_compressed.lzma
Binary files differ