diff options
Diffstat (limited to 'Test')
-rw-r--r-- | Test/A01grammar.ztst | 22 | ||||
-rw-r--r-- | Test/E01options.ztst | 14 |
2 files changed, 36 insertions, 0 deletions
diff --git a/Test/A01grammar.ztst b/Test/A01grammar.ztst index e4b6870d7..32caf5f68 100644 --- a/Test/A01grammar.ztst +++ b/Test/A01grammar.ztst @@ -103,6 +103,13 @@ 0:`exec' with -a option, no space >/bin/SPLOOSH + ( + opts=(-a /bin/WHOOOSH) + exec $opts /bin/sh -c 'echo $0' + ) +0:`exec' with -a option from expansion +>/bin/WHOOOSH + (export FOO=bar; exec -c /bin/sh -c 'echo x${FOO}x') 0:`exec' with -c option >xx @@ -123,6 +130,21 @@ >cat is /*/cat >echo is a shell builtin + args=( + 'command -pv cat' + 'command -pv echo' + 'command -p -V cat' + 'command -p -V -- echo' + ) + for arg in $args; do + ${=arg} + done +0:command -p in combination, using expansion +*>*/cat +>echo +>cat is /*/cat +>echo is a shell builtin + cd() { echo Not cd at all; } builtin cd . && unfunction cd 0:`builtin' precommand modifier diff --git a/Test/E01options.ztst b/Test/E01options.ztst index 2bd4fdb1a..dac9430cc 100644 --- a/Test/E01options.ztst +++ b/Test/E01options.ztst @@ -804,6 +804,20 @@ >print is a shell builtin ?(eval):8: command not found: print + ( + setopt posixbuiltins + opts=() + command $opts print foo + opts=(-v) + command $opts print + opts=(-V) + command $opts print + ) +0:command with options from expansion +>foo +>print +>print is a shell builtin + # With non-special command: original value restored # With special builtin: new value kept # With special builtin preceeded by "command": original value restored. |