about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2015-02-13 21:31:31 +0000
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2015-02-13 21:31:31 +0000
commitdaa7d99702b8a3580b71ee74f962719ad1d052c8 (patch)
tree664926219037f1d809ec3fb6db372b510c21c4b7 /Test
parent7e6faf7237b1862fce3ebc34f09ee9ac07940638 (diff)
downloadzsh-daa7d99702b8a3580b71ee74f962719ad1d052c8.tar.gz
zsh-daa7d99702b8a3580b71ee74f962719ad1d052c8.tar.xz
zsh-daa7d99702b8a3580b71ee74f962719ad1d052c8.zip
34546: further $_ with anon function fix.
Also add tests.
Diffstat (limited to 'Test')
-rw-r--r--Test/D04parameter.ztst29
1 files changed, 29 insertions, 0 deletions
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst
index cf639fa8c..42c7b4ec6 100644
--- a/Test/D04parameter.ztst
+++ b/Test/D04parameter.ztst
@@ -1670,3 +1670,32 @@
   print ${(e)param}
 0:Alias expansion in command substitution in parameter evaluation
 >Expanded in substitution
+
+  a=1 b=2 c=3
+  : One;
+  function {
+      : Two
+      echo $_
+      print -l $argv
+  } $_ Three
+  print -l $_ Four;
+0:$_ with anonymous function
+>Two
+>One
+>Three
+>Three
+>Four
+
+  a=1 b=2 c=3
+  : One
+  function {
+      : Two
+      echo $_
+      print -l $argv
+  }
+  print -l "$_" Four
+0:$_ with anonymous function without arguments
+>Two
+>
+>
+>Four