From 21cd640b931f5a3ce2acc14dcb0f2e931bf7296e Mon Sep 17 00:00:00 2001 From: senhuang42 Date: Tue, 22 Sep 2020 14:16:26 -0400 Subject: [PATCH] Add unit tests to guard against bad stdin --- tests/playTests.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 -- 2.47.2