summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2011-02-21 11:28:49 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2011-02-21 11:28:49 +0000
commit0e792b944707fdb8abafa4b4e3f3952154189c6f (patch)
tree0730059b6994adb39e85e65f6eb282310164e2d1 /Test
parent3c020a9a9c3b0cee6c25e565e001e3bbc0e1c421 (diff)
downloadzsh-0e792b944707fdb8abafa4b4e3f3952154189c6f.tar.gz
zsh-0e792b944707fdb8abafa4b4e3f3952154189c6f.tar.xz
zsh-0e792b944707fdb8abafa4b4e3f3952154189c6f.zip
28784: exit on exec redirection error with POISX_BUILTINS
Diffstat (limited to 'Test')
-rw-r--r--Test/A04redirect.ztst12
1 files changed, 12 insertions, 0 deletions
diff --git a/Test/A04redirect.ztst b/Test/A04redirect.ztst
index 1c63b6377..c35977c66 100644
--- a/Test/A04redirect.ztst
+++ b/Test/A04redirect.ztst
@@ -366,3 +366,15 @@
 >more output:
 >This file contains data.
 >This file contains data.
+
+  $ZTST_testdir/../Src/zsh -fc 'exec >/nonexistent/nonexistent
+  echo output'
+0:failed exec redir, no POSIX_BUILTINS
+>output
+?zsh:1: no such file or directory: /nonexistent/nonexistent
+
+  $ZTST_testdir/../Src/zsh -f -o POSIX_BUILTINS -c '
+  exec >/nonexistent/nonexistent
+  echo output'
+1:failed exec redir, POSIX_BUILTINS
+?zsh:2: no such file or directory: /nonexistent/nonexistent