From: senhuang42 Date: Tue, 22 Sep 2020 18:16:26 +0000 (-0400) Subject: Add unit tests to guard against bad stdin X-Git-Tag: v1.4.7~68^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21cd640b931f5a3ce2acc14dcb0f2e931bf7296e;p=thirdparty%2Fzstd.git Add unit tests to guard against bad stdin --- diff --git a/tests/playTests.sh b/tests/playTests.sh index 44fd74008..aee790da5 100755 --- a/tests/playTests.sh +++ b/tests/playTests.sh @@ -309,6 +309,18 @@ test -f precompressedFilterTestDir/input.5.zst.zst test -f precompressedFilterTestDir/input.6.zst.zst println "Test completed" + + +println "\n===> warning prompt does not swallow characters" +println "y" > tmpPrompt +println "hello world" >> tmpPrompt +zstd tmpPrompt +zstd < tmpPrompt -o tmpPrompt.zst +zstd -q -d tmpPrompt.zst -o tmpPromptRegenerated +$DIFF tmpPromptRegenerated tmpPrompt +println "Test completed" + + println "\n===> recursive mode test " # combination of -r with empty list of input file zstd -c -r < tmp > tmp.zst