diff options
Diffstat (limited to 'Test/D08cmdsubst.ztst')
-rw-r--r-- | Test/D08cmdsubst.ztst | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Test/D08cmdsubst.ztst b/Test/D08cmdsubst.ztst index 89e725966..4e0759e35 100644 --- a/Test/D08cmdsubst.ztst +++ b/Test/D08cmdsubst.ztst @@ -153,3 +153,27 @@ eval 'foo echo this just works, OK\?)' 0:backtracking within command string parsing with alias still pending >this just works, OK? + + ( + set errexit + show_nargs() { print $#; } + print a $() b + print c "$()" d + ) +0:Empty $() is a valid empty substitution. +>a b +>c d + + empty=$() && print "'$empty'" +0:Empty $() is a valid assignment +>'' + + ( + setopt ignoreclosebraces + alias OPEN='{' CLOSE='};' + eval '{ OPEN print hi; CLOSE } + var=$({ OPEN print bye; CLOSE}) && print $var' + ) +0:Alias expansion needed in parsing substituions +>hi +>bye |