From dbbcbf67cb8a330e5c7d8a40ed4152a53db6b5f8 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 22 Feb 2011 20:09:20 +0000 Subject: 28791: exit on errors with special builtins with POSIXBUILTINS --- Test/A04redirect.ztst | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'Test') 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 -- cgit v1.2.3-70-g09d2