]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Add tests for compressed data on console
authorSean Purcell <me@seanp.xyz>
Thu, 16 Mar 2017 23:25:19 +0000 (16:25 -0700)
committerSean Purcell <me@seanp.xyz>
Thu, 16 Mar 2017 23:25:19 +0000 (16:25 -0700)
tests/playTests.sh

index c493fed55358d04ee69632aafdfb491edd7569fb..c584fe5602649dcd586c9d638f8955202acfd9b8 100755 (executable)
@@ -72,6 +72,10 @@ cp tmp tmp2
 $ZSTD tmp2 -fo && die "-o must be followed by filename "
 $ECHO "test : implied stdout when input is stdin"
 $ECHO bob | $ZSTD | $ZSTD -d
+$ECHO "test : compressed data to terminal"
+$ECHO bob | $ZSTD && die "should have refused : compressed data to terminal"
+$ECHO "test : compressed data from terminal (a hang here is a test fail, zstd is wrongly waiting on data from terminal)"
+$ZSTD -d > $INTOVOID && die "should have refused : compressed data from terminal"
 $ECHO "test : null-length file roundtrip"
 $ECHO -n '' | $ZSTD - --stdout | $ZSTD -d --stdout
 $ECHO "test : decompress file with wrong suffix (must fail)"