From 0b25ab2202fec7db59ccab8d73dc1a5fc1d679c3 Mon Sep 17 00:00:00 2001 From: Bimba Shrestha Date: Mon, 9 Sep 2019 11:54:43 -0700 Subject: [PATCH] Testing first block decompression cli --- tests/files/rle-first-block.zst | Bin 0 -> 45 bytes tests/golden/huffman-compressed-larger | Bin 0 -> 143 bytes tests/playTests.sh | 9 +++++++-- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 tests/files/rle-first-block.zst create mode 100644 tests/golden/huffman-compressed-larger diff --git a/tests/files/rle-first-block.zst b/tests/files/rle-first-block.zst new file mode 100644 index 0000000000000000000000000000000000000000..fd067edd74ef9bab1dcf9af83baa7fee24f73287 GIT binary patch literal 45 ac-qt0s{eNh1A_nq6CTVA#2@X%9s&S`PX%=V literal 0 Hc-jL100001 diff --git a/tests/golden/huffman-compressed-larger b/tests/golden/huffman-compressed-larger new file mode 100644 index 0000000000000000000000000000000000000000..f594f1ae9816a52054935aab96eec94c4ffe14b7 GIT binary patch literal 143 zc-jGv0C4{(wJ-eyP!$9KW`-Ueka7hx0Dvr|0RR9101)1^uIswqo=F4%0Du4hfEEB3 z02Tl|2JCX%cWtRD`Y@9(#KBM?3Vi8VgP*Qj(lfvmE1c0RaG879=~%<1Ug5Gim?; literal 0 Hc-jL100001 diff --git a/tests/playTests.sh b/tests/playTests.sh index 69387321f..34f4dfcc2 100755 --- a/tests/playTests.sh +++ b/tests/playTests.sh @@ -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 " -- 2.47.3