fixed : null-length string roundtrip

This commit is contained in:
Yann Collet
2016-05-10 05:56:09 +02:00
parent 8b23eea694
commit d693117113
2 changed files with 6 additions and 6 deletions
+4 -3
View File
@@ -29,10 +29,11 @@ $ZSTD -f tmp # trivial compression case, creates tmp
$ZSTD -df tmp.zst # trivial decompression case (overwrites tmp)
echo "test : too large compression level (must fail)"
$ZSTD -99 tmp && die "too large compression level undetected"
echo "test : compress null-length file"
echo "test : compress to stdout"
$ZSTD tmp -c > tmpCompressed
$ZSTD tmp --stdout > tmpCompressed # long command format
echo "test : null-length file roundtrip"
echo -n '' | $ZSTD - --stdout | $ZSTD -d --stdout
$ZSTD tmp -c > tmpCompressed # compression using stdout
$ZSTD tmp --stdout > tmpCompressed # compressoin using stdout, long format
echo "test : decompress file with wrong suffix (must fail)"
$ZSTD -d tmpCompressed && die "wrong suffix error not detected!"
$ZSTD -d tmpCompressed -c > tmpResult # decompression using stdout