about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2011-02-22 20:09:20 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2011-02-22 20:09:20 +0000
commitdbbcbf67cb8a330e5c7d8a40ed4152a53db6b5f8 (patch)
tree41ec7fbda389e5ec8d04a8c3ad21b27f01659912 /Test
parent73ebca4fe92767665422e7fd5dc15032add389b4 (diff)
downloadzsh-dbbcbf67cb8a330e5c7d8a40ed4152a53db6b5f8.tar.gz
zsh-dbbcbf67cb8a330e5c7d8a40ed4152a53db6b5f8.tar.xz
zsh-dbbcbf67cb8a330e5c7d8a40ed4152a53db6b5f8.zip
28791: exit on errors with special builtins with POSIXBUILTINS
Diffstat (limited to 'Test')
-rw-r--r--Test/A04redirect.ztst49
1 files changed, 49 insertions, 0 deletions
diff --git a/Test/A04redirect.ztst b/Test/A04redirect.ztst
index c35977c66..9340b71f0 100644
--- a/Test/A04redirect.ztst
+++ b/Test/A04redirect.ztst
@@ -378,3 +378,52 @@
   echo output'
 1:failed exec redir, POSIX_BUILTINS
 ?zsh:2: no such file or directory: /nonexistent/nonexistent
+
+  $ZTST_testdir/../Src/zsh -f -o POSIX_BUILTINS -c '
+  set >/nonexistent/nonexistent
+  echo output'
+1:failed special builtin redir, POSIX_BUILTINS
+?zsh:2: no such file or directory: /nonexistent/nonexistent
+
+  $ZTST_testdir/../Src/zsh -f -o POSIX_BUILTINS -c '
+  echo >/nonexistent/nonexistent
+  echo output'
+0:failed unspecial builtin redir, POSIX_BUILTINS
+>output
+?zsh:2: no such file or directory: /nonexistent/nonexistent
+
+  $ZTST_testdir/../Src/zsh -f -o POSIX_BUILTINS -c '
+  . /nonexistent/nonexistent
+  echo output'
+1:failed dot, POSIX_BUILTINS
+?zsh:.:2: no such file or directory: /nonexistent/nonexistent
+
+  $ZTST_testdir/../Src/zsh -f -c '
+  . /nonexistent/nonexistent
+  echo output'
+0:failed dot, NO_POSIX_BUILTINS
+>output
+?zsh:.:2: no such file or directory: /nonexistent/nonexistent
+
+  $ZTST_testdir/../Src/zsh -f <<<'
+  readonly foo
+  foo=bar set output
+  echo output'
+0:failed assignment on posix special, NO_POSIX_BUILTINS
+>output
+?zsh: read-only variable: foo
+
+  $ZTST_testdir/../Src/zsh -f -o POSIX_BUILTINS <<<'
+  readonly foo
+  foo=bar set output
+  echo output'
+1:failed assignment on posix special, POSIX_BUILTINS
+?zsh: read-only variable: foo
+
+  $ZTST_testdir/../Src/zsh -f -o POSIX_BUILTINS <<<'
+  readonly foo
+  foo=bar echo output
+  echo output'
+0:failed assignment on non-posix-special, POSIX_BUILTINS
+>output
+?zsh: read-only variable: foo