From 88c42a2ba0f0baa9fd20bb7abddc2ad89b66a508 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sun, 30 Oct 2016 17:12:04 +0000 Subject: 39777: $() is a valid empty command substitution --- Test/D08cmdsubst.ztst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Test') diff --git a/Test/D08cmdsubst.ztst b/Test/D08cmdsubst.ztst index 89e725966..362537349 100644 --- a/Test/D08cmdsubst.ztst +++ b/Test/D08cmdsubst.ztst @@ -153,3 +153,17 @@ 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 +>'' -- cgit 1.4.1