]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Add CLI test to validate error
authorshakeelrao <shakeelrao79@gmail.com>
Sun, 24 Mar 2019 07:47:13 +0000 (00:47 -0700)
committershakeelrao <shakeelrao79@gmail.com>
Sun, 24 Mar 2019 07:47:13 +0000 (00:47 -0700)
tests/playTests.sh

index 493542960ed01321d7974bef909289f4c3f52771..137f1a441706cf529ba8df072fe1644cfcc7b635 100755 (executable)
@@ -410,6 +410,8 @@ $ECHO "- Create first dictionary "
 TESTFILE=../programs/zstdcli.c
 $ZSTD --train *.c ../programs/*.c -o tmpDict
 cp $TESTFILE tmp
+$ECHO "- Compress dictionary with itself"
+$ZSTD -f tmpDict -D tmpDict | grep "cannot use" && die "expected error : cannot compress dictionary with itself"
 $ECHO "- Dictionary compression roundtrip"
 $ZSTD -f tmp -D tmpDict
 $ZSTD -d tmp.zst -D tmpDict -fo result