summaryrefslogtreecommitdiff
path: root/Test/A04redirect.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2017-05-08 10:54:08 +0100
committerPeter Stephenson <pws@zsh.org>2017-05-08 10:54:08 +0100
commitf25d01a97c61fdac5d6e0a6a8fb63b5b2b5f3393 (patch)
treece13fa223142a4c22541e6df4aee8ac7b50ae9cf /Test/A04redirect.ztst
parentaa8157b463c18489b378da322f46574bd9ab8dbb (diff)
downloadzsh-f25d01a97c61fdac5d6e0a6a8fb63b5b2b5f3393.tar.gz
zsh-f25d01a97c61fdac5d6e0a6a8fb63b5b2b5f3393.zip
Fix combination of HERE document and |&.
A missing flag setting up the HERE document mean that the size of the wordcode needed to append the 2>&1 was counted incorrectly, so the resulting wordcode was garbled. Add test.
Diffstat (limited to 'Test/A04redirect.ztst')
-rw-r--r--Test/A04redirect.ztst15
1 files changed, 15 insertions, 0 deletions
diff --git a/Test/A04redirect.ztst b/Test/A04redirect.ztst
index d7fe22fb0..a5de552c1 100644
--- a/Test/A04redirect.ztst
+++ b/Test/A04redirect.ztst
@@ -586,3 +586,18 @@
>x
>bar
>y
+
+ fn-here-pipe() {
+ cat <<-HERE |& cat
+ FOO
+ HERE
+ }
+ fn-here-pipe
+ which fn-here-pipe
+0:Combination of HERE-document and |&
+>FOO
+>fn-here-pipe () {
+> cat <<HERE 2>&1 | cat
+>FOO
+>HERE
+>}