From: Kevin Svetlitski Date: Fri, 12 Nov 2021 22:10:21 +0000 (-0800) Subject: Integrate verbose mode tests into playTests.sh X-Git-Tag: v1.5.1~1^2~60^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b28c26cbff0d43eb72d90ba5ef2fea27659638e;p=thirdparty%2Fzstd.git Integrate verbose mode tests into playTests.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:]]+"