about summary refs log tree commit diff
path: root/Test/D03procsubst.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2012-12-21 11:28:33 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2012-12-21 11:28:33 +0000
commit841e60c3408bc9b5eb679efd5cb4f7285cf799e8 (patch)
tree835950783704ccc23a8c81d069414ebe63d18e67 /Test/D03procsubst.ztst
parenta9feb3b28acae7e27fdd9a4337192d6c0bc84a13 (diff)
downloadzsh-841e60c3408bc9b5eb679efd5cb4f7285cf799e8.tar.gz
zsh-841e60c3408bc9b5eb679efd5cb4f7285cf799e8.tar.xz
zsh-841e60c3408bc9b5eb679efd5cb4f7285cf799e8.zip
this prevent process-based features from working in their arguments
Diffstat (limited to 'Test/D03procsubst.ztst')
-rw-r--r--Test/D03procsubst.ztst19
1 files changed, 19 insertions, 0 deletions
diff --git a/Test/D03procsubst.ztst b/Test/D03procsubst.ztst
index 602b1da15..88fa902bb 100644
--- a/Test/D03procsubst.ztst
+++ b/Test/D03procsubst.ztst
@@ -88,3 +88,22 @@
   print something=${:-=(echo 'C,D),(F,G)'}
 1: Graceful handling of bad substitution in enclosed context
 ?(eval):1: unterminated `=(...)'
+
+  () {
+     print -n "first: "
+     cat $1
+     print -n "second: "
+     cat $2
+  } =(echo This becomes argument one) =(echo and this argument two)
+  function {
+     print -n "third: "
+     cat $1
+     print -n "fourth: "
+     cat $2
+  } =(echo This becomes argument three) =(echo and this argument four)
+0:Process environment of anonymous functions
+>first: This becomes argument one
+>second: and this argument two
+>third: This becomes argument three
+>fourth: and this argument four
+