From: Sean Purcell Date: Fri, 7 Apr 2017 00:06:30 +0000 (-0700) Subject: Add refuse to overwrite test and fix format X-Git-Tag: v1.2.0^2~52^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F650%2Fhead;p=thirdparty%2Fzstd.git Add refuse to overwrite test and fix format --- 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"