about summary refs log tree commit diff
path: root/Test/A04redirect.ztst
diff options
context:
space:
mode:
Diffstat (limited to 'Test/A04redirect.ztst')
-rw-r--r--Test/A04redirect.ztst11
1 files changed, 11 insertions, 0 deletions
diff --git a/Test/A04redirect.ztst b/Test/A04redirect.ztst
index b8086e724..7ad02db3b 100644
--- a/Test/A04redirect.ztst
+++ b/Test/A04redirect.ztst
@@ -328,6 +328,17 @@
 1q:NO_CLOBBER prevents overwriting parameter with allocated fd
 ?(eval):4: can't clobber parameter myfd containing file descriptor $myfd
 
+  (setopt noclobber
+   exec {myfd}>logfile2b
+   print First open >&$myfd
+   rm -f logfile2b # prevent normal file no_clobberation
+   myotherfd="${myfd}+0"
+   exec {myotherfd}>logfile2b
+   print Overwritten >&$myotherfd)
+   cat logfile2b
+0:NO_CLOBBER doesn't complain about any other expression
+>Overwritten
+
   (exec {myfd}>logfile4
   echo $myfd
   exec {myfd}>&-