From b9550d6d43d2487a4b5184f5c94afb565f19ab97 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Fri, 28 Oct 2016 14:43:24 -0700 Subject: [PATCH] fixed benchmark mode typo . added benchmark mode tests --- programs/zstdcli.c | 2 +- tests/playTests.sh | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/programs/zstdcli.c b/programs/zstdcli.c index c9d2cf5db..db4d6acc6 100644 --- a/programs/zstdcli.c +++ b/programs/zstdcli.c @@ -369,7 +369,7 @@ int main(int argCount, const char* argv[]) #ifndef ZSTD_NOBENCH /* Benchmark */ - case 'b': operation=zom_train; argument++; break; + case 'b': operation=zom_bench; argument++; break; /* range bench (benchmark only) */ case 'e': diff --git a/tests/playTests.sh b/tests/playTests.sh index c5a58d628..ad70538a3 100755 --- a/tests/playTests.sh +++ b/tests/playTests.sh @@ -258,6 +258,17 @@ $ZSTD -t --rm tmp1.zst ls -ls tmp1.zst # check file is still present +$ECHO "\n**** benchmark mode tests **** " + +$ECHO "bench one file" +./datagen > tmp1 +$ZSTD -bi1 tmp1 +$ECHO "bench multiple levels" +$ZSTD -i1b1e3 tmp1 +$ECHO "with recursive and quiet modes" +$ZSTD -rqi1b1e3 tmp1 + + $ECHO "\n**** zstd round-trip tests **** " roundTripTest