about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <p.stephenson@samsung.com>2020-06-09 18:04:46 +0100
committerPeter Stephenson <p.stephenson@samsung.com>2020-06-09 18:07:01 +0100
commit3df604a4be76db6ccf285eda6b4b3f5f6ec7497d (patch)
tree244774fd13ebf129d029f521fa2f8d707763da6f /Test
parent172b646a6baa4037a4dbc4d056f2b4b786eea24e (diff)
downloadzsh-3df604a4be76db6ccf285eda6b4b3f5f6ec7497d.tar.gz
zsh-3df604a4be76db6ccf285eda6b4b3f5f6ec7497d.tar.xz
zsh-3df604a4be76db6ccf285eda6b4b3f5f6ec7497d.zip
46026: Add CLOBBER_EMPTY option.
Diffstat (limited to 'Test')
-rw-r--r--Test/A04redirect.ztst14
1 files changed, 14 insertions, 0 deletions
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