summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2016-10-30 17:12:04 +0000
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2016-10-30 17:12:04 +0000
commit88c42a2ba0f0baa9fd20bb7abddc2ad89b66a508 (patch)
treeb49636d4f92246f1bac95eeac070517923092418 /Test
parentab81b98c49ace618f5a1607faf718e0b2e43948d (diff)
downloadzsh-88c42a2ba0f0baa9fd20bb7abddc2ad89b66a508.tar.gz
zsh-88c42a2ba0f0baa9fd20bb7abddc2ad89b66a508.tar.xz
zsh-88c42a2ba0f0baa9fd20bb7abddc2ad89b66a508.zip
39777: $() is a valid empty command substitution
Diffstat (limited to 'Test')
-rw-r--r--Test/D08cmdsubst.ztst14
1 files changed, 14 insertions, 0 deletions
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
+>''