]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Add test case for PR #972 973/head
authorNick Terrell <terrelln@fb.com>
Wed, 3 Jan 2018 22:02:44 +0000 (14:02 -0800)
committerNick Terrell <terrelln@fb.com>
Wed, 3 Jan 2018 23:52:18 +0000 (15:52 -0800)
tests/playTests.sh

index c93c58fe8d58814d2cac8d16cbaeec7d89fb6747..b5ffadc23e2111b3c63a6c5f3f1b8d860a146d61 100755 (executable)
@@ -190,6 +190,13 @@ $ZSTD -t tmp1.zst tmp2.zst
 $ZSTD -dc tmp1.zst tmp2.zst
 $ZSTD tmp1.zst tmp2.zst -o "$INTOVOID"
 $ZSTD -d tmp1.zst tmp2.zst -o tmp
+touch tmpexists
+$ZSTD tmp1 tmp2 -f -o tmpexists
+$ZSTD tmp1 tmp2 -o tmpexists && die "should have refused to overwrite"
+# Bug: PR #972
+if [ "$?" -eq 139 ]; then
+  die "should not have segfaulted"
+fi
 rm tmp*