summaryrefslogtreecommitdiffstats
path: root/Test/A04redirect.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2014-09-29 21:31:37 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2014-09-29 21:31:37 +0100
commit8cb67e721b3f02779bf4cf0d6a368f67c49c11f8 (patch)
tree851f6234cb2740781dffa876e9e489d87153eb20 /Test/A04redirect.ztst
parent33285: apply function definition redirections at execution (diff)
downloadzsh-8cb67e721b3f02779bf4cf0d6a368f67c49c11f8.tar
zsh-8cb67e721b3f02779bf4cf0d6a368f67c49c11f8.tar.gz
zsh-8cb67e721b3f02779bf4cf0d6a368f67c49c11f8.tar.bz2
zsh-8cb67e721b3f02779bf4cf0d6a368f67c49c11f8.tar.lz
zsh-8cb67e721b3f02779bf4cf0d6a368f67c49c11f8.tar.xz
zsh-8cb67e721b3f02779bf4cf0d6a368f67c49c11f8.tar.zst
zsh-8cb67e721b3f02779bf4cf0d6a368f67c49c11f8.zip
33286: handle redirections for multiply named functions
Diffstat (limited to 'Test/A04redirect.ztst')
-rw-r--r--Test/A04redirect.ztst16
1 files changed, 16 insertions, 0 deletions
diff --git a/Test/A04redirect.ztst b/Test/A04redirect.ztst
index 436ae59cd..6c38a3194 100644
--- a/Test/A04redirect.ztst
+++ b/Test/A04redirect.ztst
@@ -491,3 +491,19 @@
> print I want to tell you about $var
> print Also, this might be an error >&2
>} < input2 > output2 2>&1
+
+ 1func 2func 3func() { print Ich heisse $0 } >output3
+ for i in 1 2 3; do
+ f=${i}func
+ print Running $f
+ $f
+ cat output3
+ unfunction $f
+ done
+0:multiply named functions with redirection
+>Running 1func
+>Ich heisse 1func
+>Running 2func
+>Ich heisse 2func
+>Running 3func
+>Ich heisse 3func