From cbb3ce376b3ecbe2a1a45d8ddcdeb0d6f2d7deb8 Mon Sep 17 00:00:00 2001 From: Nick Terrell Date: Sun, 1 Jan 2017 01:59:51 -0500 Subject: [PATCH] Add cover cli to playtests --- tests/playTests.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/playTests.sh b/tests/playTests.sh index dfc90c338..a94446e7e 100755 --- a/tests/playTests.sh +++ b/tests/playTests.sh @@ -255,6 +255,27 @@ rm -rf dirTestDict rm tmp* +$ECHO "\n**** cover dictionary tests **** " + +TESTFILE=../programs/zstdcli.c +./datagen > tmpDict +$ECHO "- Create first dictionary" +$ZSTD --train --cover=k=46,d=8 *.c ../programs/*.c -o tmpDict +cp $TESTFILE tmp +$ZSTD -f tmp -D tmpDict +$ZSTD -d tmp.zst -D tmpDict -fo result +$DIFF $TESTFILE result +$ECHO "- Create second (different) dictionary" +$ZSTD --train --cover=kmin=46,kstep=2,kmax=64,d=6,smoothing=23 *.c ../programs/*.c ../programs/*.h -o tmpDictC +$ZSTD -d tmp.zst -D tmpDictC -fo result && die "wrong dictionary not detected!" +$ECHO "- Create dictionary with short dictID" +$ZSTD --train --cover=k=46,d=8 *.c ../programs/*.c --dictID 1 -o tmpDict1 +cmp tmpDict tmpDict1 && die "dictionaries should have different ID !" +$ECHO "- Create dictionary with size limit" +$ZSTD --train --optimize-cover=kstep=2,d=8 *.c ../programs/*.c -o tmpDict2 --maxdict 4K +rm tmp* + + $ECHO "\n**** integrity tests **** " $ECHO "test one file (tmp1.zst) " -- 2.47.3