From 3df604a4be76db6ccf285eda6b4b3f5f6ec7497d Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 9 Jun 2020 18:04:46 +0100 Subject: 46026: Add CLOBBER_EMPTY option. --- Test/A04redirect.ztst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Test') diff --git a/Test/A04redirect.ztst b/Test/A04redirect.ztst index d60519064..993138e7d 100644 --- a/Test/A04redirect.ztst +++ b/Test/A04redirect.ztst @@ -708,3 +708,17 @@ cat <&$testfd 0:Regression test for here document with fd declarator > This is, in some sense, a here document. + + (setopt noclobber clobberempty + rm -f foo + touch foo + print Works >foo + cat foo + print Works not >foo + # Make sure the file was not harmed + cat foo + ) +0:CLOBBER_EMPTY +>Works +>Works +?(eval):6: file exists: foo -- cgit 1.4.1