]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Testing first block decompression cli
authorBimba Shrestha <bshrestha.msae@gmail.com>
Mon, 9 Sep 2019 18:54:43 +0000 (11:54 -0700)
committerBimba Shrestha <bshrestha.msae@gmail.com>
Mon, 9 Sep 2019 18:54:43 +0000 (11:54 -0700)
tests/files/rle-first-block.zst [new file with mode: 0644]
tests/golden/huffman-compressed-larger [new file with mode: 0644]
tests/playTests.sh

diff --git a/tests/files/rle-first-block.zst b/tests/files/rle-first-block.zst
new file mode 100644 (file)
index 0000000..fd067ed
Binary files /dev/null and b/tests/files/rle-first-block.zst differ
diff --git a/tests/golden/huffman-compressed-larger b/tests/golden/huffman-compressed-larger
new file mode 100644 (file)
index 0000000..f594f1a
Binary files /dev/null and b/tests/golden/huffman-compressed-larger differ
index 69387321f92fac4fbc17b3a8ab9873eadd702c82..34f4dfcc289d1f7ffeb7dc7dd4d7259198d3ecbf 100755 (executable)
@@ -242,6 +242,11 @@ $ZSTD -f tmp && die "attempt to compress a non existing file"
 test -f tmp.zst  # destination file should still be present
 rm tmp*
 
+println "\n===> decompression only tests "
+head -c 1M /dev/zero > tmp
+$ZSTD -d -o tmp1 "$TESTDIR/files/rle-first-block.zst"
+$DIFF -s tmp1 tmp
+rm tmp*
 
 println "test : compress multiple files"
 println hello > tmp1
@@ -583,8 +588,8 @@ $ZSTD -t tmpSplit.* && die "bad file not detected !"
 
 println "\n===>  golden files tests "
 
-$ZSTD -t -r "$TESTDIR/files"
-$ZSTD -c -r "$TESTDIR/files" | $ZSTD -t
+$ZSTD -t -r "$TESTDIR/golden"
+$ZSTD -c -r "$TESTDIR/golden" | $ZSTD -t
 
 
 println "\n===>  benchmark mode tests "