From 1652172b2d11e87ef26ad04a0406428cd13be3c1 Mon Sep 17 00:00:00 2001 From: Sean Purcell Date: Thu, 6 Apr 2017 17:06:30 -0700 Subject: [PATCH] Add refuse to overwrite test and fix format --- tests/playTests.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/playTests.sh b/tests/playTests.sh index 5409d9aa1..266bbd91b 100755 --- a/tests/playTests.sh +++ b/tests/playTests.sh @@ -110,12 +110,13 @@ $ECHO "test : force overwrite" $ZSTD -q -f tmp $ZSTD -q --force tmp $ECHO "test : overwrite readonly file" +rm -f tmpro tmpro.zst $ECHO foo > tmpro.zst $ECHO foo > tmpro chmod 400 tmpro.zst -$ZSTD -q --force tmpro || die "failed to overwrite read-only file" -chmod 600 tmpro.zst -rm tmpro tmpro.zst +$ZSTD -q tmpro && die "should have refused to overwrite read-only file" +$ZSTD -q -f tmpro +rm -f tmpro tmpro.zst $ECHO "test : file removal" $ZSTD -f --rm tmp ls tmp && die "tmp should no longer be present" -- 2.47.2