From 9b28c26cbff0d43eb72d90ba5ef2fea27659638e Mon Sep 17 00:00:00 2001 From: Kevin Svetlitski Date: Fri, 12 Nov 2021 14:10:21 -0800 Subject: [PATCH] Integrate verbose mode tests into playTests.sh --- tests/playTests.sh | 7 +++++++ tests/test_verbose_output.sh | 9 --------- 2 files changed, 7 insertions(+), 9 deletions(-) delete mode 100755 tests/test_verbose_output.sh diff --git a/tests/playTests.sh b/tests/playTests.sh index 69653276a..5d26fb8f5 100755 --- a/tests/playTests.sh +++ b/tests/playTests.sh @@ -753,6 +753,13 @@ datagen -g257000 > tmp_files/tmp3 zstd --show-default-cparams -f -r tmp_files rm -rf tmp* +println "test : show compression parameters in verbose mode" +datagen > tmp +zstd -vv tmp 2>&1 | \ +grep -q -E -- "--zstd=wlog=[[:digit:]]+,clog=[[:digit:]]+,hlog=[[:digit:]]+,\ +slog=[[:digit:]]+,mml=[[:digit:]]+,tlen=[[:digit:]]+,strat=[[:digit:]]+" +rm -rf tmp* + println "\n===> Advanced compression parameters " println "Hello world!" | zstd --zstd=windowLog=21, - -o tmp.zst && die "wrong parameters not detected!" println "Hello world!" | zstd --zstd=windowLo=21 - -o tmp.zst && die "wrong parameters not detected!" diff --git a/tests/test_verbose_output.sh b/tests/test_verbose_output.sh deleted file mode 100755 index 9fc8a29e9..000000000 --- a/tests/test_verbose_output.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -set -e -u -o pipefail - -make -j -C .. CFLAGS=-O1 zstd -empty_file=$(mktemp) -trap 'rm -f $empty_file' EXIT -../zstd -vv "$empty_file" 2>&1 | \ -grep -q -E -- "--zstd=wlog=[[:digit:]]+,clog=[[:digit:]]+,hlog=[[:digit:]]+,\ -slog=[[:digit:]]+,mml=[[:digit:]]+,tlen=[[:digit:]]+,strat=[[:digit:]]+" -- 2.47.2