diff options
author | Peter Stephenson <pws@zsh.org> | 2014-09-30 12:58:52 +0100 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2014-09-30 12:58:52 +0100 |
commit | 0557c226fcd817ef21f91ed76e01db6e965b0709 (patch) | |
tree | b8ec103f194b5027fa847d951a2060402125c5ea /Test | |
parent | 15222bcdcb3fddd897117ac08ed18d206fa383d1 (diff) | |
download | zsh-0557c226fcd817ef21f91ed76e01db6e965b0709.tar.gz zsh-0557c226fcd817ef21f91ed76e01db6e965b0709.tar.xz zsh-0557c226fcd817ef21f91ed76e01db6e965b0709.zip |
33294: $functions[func_with_redir] plus extra tests
Diffstat (limited to 'Test')
-rw-r--r-- | Test/A04redirect.ztst | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Test/A04redirect.ztst b/Test/A04redirect.ztst index 6c38a3194..a39ce46c8 100644 --- a/Test/A04redirect.ztst +++ b/Test/A04redirect.ztst @@ -507,3 +507,27 @@ >Ich heisse 2func >Running 3func >Ich heisse 3func + + redirfn2() { print The latest output; } >&3 + redirfn2 3>output4 + print No output yet + cat output4 +0:Redirections in both function definition and command line +>No output yet +>The latest output + +# This relies on the fact that the test harness always loads +# the zsh/parameter module. + print $functions[redirfn] +0:Output from $functions[] for definition with redirection +>{ +> local var +> read var +> print I want to tell you about $var +> print Also, this might be an error >&2 +>} < input2 > output2 2>&1 + + noredirfn() { print This rather boring function has no redirection.; } + print $functions[noredirfn] +0:Output from $functions[] for definition with no redirection +> print This rather boring function has no redirection. |