]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Adding test for --[no-]content-size
authorBimba Shrestha <bimbashrestha@fb.com>
Mon, 9 Mar 2020 19:44:38 +0000 (14:44 -0500)
committerBimba Shrestha <bimbashrestha@fb.com>
Mon, 9 Mar 2020 19:44:38 +0000 (14:44 -0500)
tests/playTests.sh

index c7605cc480fe8c1cadb3ee68e629bed8e4d24c2a..c020127fe590b2399b361ffb876573ffc8d3d90f 100755 (executable)
@@ -469,6 +469,19 @@ ls tmp* > tmpList
 $ZSTD -f tmp1 --filelist=tmpList --filelist=tmpList tmp2 tmp3  # can trigger an overflow of internal file list
 rm -rf tmp*
 
+println "\n===> --[no-]content-size tests"
+
+$DATAGEN > tmp_contentsize
+$ZSTD -f tmp_contentsize
+$ZSTD -lv tmp_contentsize.zst | grep "Decompressed Size:"
+$ZSTD -f --no-content-size tmp_contentsize
+$ZSTD -lv tmp_contentsize.zst | grep "Decompressed Size:" && die
+$ZSTD -f --content-size tmp_contentsize
+$ZSTD -lv tmp_contentsize.zst | grep "Decompressed Size:"
+$ZSTD -f --content-size --no-content-size tmp_contentsize
+$ZSTD -lv tmp_contentsize.zst | grep "Decompressed Size:" && die
+rm -rf tmp*
+
 println "test : show-default-cparams regular"
 $DATAGEN > tmp
 $ZSTD --show-default-cparams -f tmp