Add unit tests to guard against bad stdin

This commit is contained in:
senhuang42 2020-09-22 14:16:26 -04:00
parent 7aa3da1cd7
commit 21cd640b93

View File

@ -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