From 85d07c6c474abc8f16b069332fbaba3054819d14 Mon Sep 17 00:00:00 2001 From: Nick Magerko Date: Fri, 16 Aug 2019 12:49:21 -0700 Subject: [PATCH] Tweak stdout, stderr redirection in new playTests --- tests/playTests.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/playTests.sh b/tests/playTests.sh index 431a53a18..c516aa712 100755 --- a/tests/playTests.sh +++ b/tests/playTests.sh @@ -1023,8 +1023,8 @@ println "\n===> stream-size mode" ./datagen -g11000 > tmp println "test : basic file compression vs sized streaming compression" -$ZSTD -14 -f tmp -o tmp.zst |& tee file.out -cat tmp | $ZSTD -14 -f -o tmp.zst --stream-size=11000 |& tee stream_sized.out +$ZSTD -14 -f tmp -o tmp.zst 2>&1 | tee file.out +cat tmp | $ZSTD -14 -f -o tmp.zst --stream-size=11000 2>&1 | tee stream_sized.out file_ratio=$(cat file.out | awk '{print $4}' | sed 's/%//g') stream_sized_ratio=$(cat stream_sized.out | awk '{print $4}' | sed 's/%//g') @@ -1035,7 +1035,10 @@ if [ $(echo "(100 * $ratio_diff) > 5" | bc -l) == 1 ] then die "greater than 0.05% difference between file and sized-streaming compression" fi - +println "test : sized streaming compression and decompression" +cat tmp | $ZSTD -14 -f tmp -o --stream-size=11000 tmp.zst +$ZSTD -df tmp.zst -o tmp_decompress +cmp tmp tmp_decompress || die "difference between original and decompressed file" println "test : incorrect stream size" cat tmp | $ZSTD -14 -f -o tmp.zst --stream-size=11001 && die "should fail with incorrect stream size"