summaryrefslogtreecommitdiff
path: root/Test/E01options.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2017-07-26 16:56:23 +0100
committerPeter Stephenson <pws@zsh.org>2017-07-27 09:22:04 +0100
commitd4b94b5e8388c744a1d879fecb5af957b170c4c1 (patch)
tree56352f47635ef1436e0669aa85f2f570d9d3aec7 /Test/E01options.ztst
parent18c3c12bf0dc0fdbfb9ff79ebf90475a1dadc606 (diff)
downloadzsh-d4b94b5e8388c744a1d879fecb5af957b170c4c1.tar.gz
zsh-d4b94b5e8388c744a1d879fecb5af957b170c4c1.zip
41464, 41466: With POSIX_BUILTINS, exec only executes sexternal commands.
Document the default behaviour and add a test.
Diffstat (limited to 'Test/E01options.ztst')
-rw-r--r--Test/E01options.ztst14
1 files changed, 14 insertions, 0 deletions
diff --git a/Test/E01options.ztst b/Test/E01options.ztst
index dac9430cc..f01d83567 100644
--- a/Test/E01options.ztst
+++ b/Test/E01options.ztst
@@ -831,6 +831,20 @@
>val2
>val2
+ print "Contents of file" >cat_arg
+ (
+ cat() { print Function with argument $1 }
+ print Without
+ (exec cat cat_arg; print Not reached)
+ print With
+ (setopt posixbuiltins; exec cat cat_arg; print Not reached)
+ )
+0:POSIX_BUILTINS and exec
+>Without
+>Function with argument cat_arg
+>With
+>Contents of file
+
# PRINTEXITVALUE only works if shell input is coming from standard input.
# Goodness only knows why.
$ZTST_testdir/../Src/zsh -f <<<'