From d4b94b5e8388c744a1d879fecb5af957b170c4c1 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 26 Jul 2017 16:56:23 +0100 Subject: 41464, 41466: With POSIX_BUILTINS, exec only executes sexternal commands. Document the default behaviour and add a test. --- Test/E01options.ztst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Test/E01options.ztst') 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 <<<' -- cgit 1.4.1