about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-09-02 14:20:44 +0100
committerPeter Stephenson <pws@zsh.org>2015-09-02 14:20:44 +0100
commit0e63286bd47bab051d49597d3df160b1e9dbb6a3 (patch)
tree64e3ef590205fce45a6065df33b4cf1f4a57055e /Test
parent8e3ca08f13f198caa7cd7dc2bb37863238bea4f2 (diff)
downloadzsh-0e63286bd47bab051d49597d3df160b1e9dbb6a3.tar.gz
zsh-0e63286bd47bab051d49597d3df160b1e9dbb6a3.tar.xz
zsh-0e63286bd47bab051d49597d3df160b1e9dbb6a3.zip
36399: Shell code text with multiple here documents wasn't shown properly.
Diffstat (limited to 'Test')
-rw-r--r--Test/A04redirect.ztst31
1 files changed, 31 insertions, 0 deletions
diff --git a/Test/A04redirect.ztst b/Test/A04redirect.ztst
index 602341d05..d7fe22fb0 100644
--- a/Test/A04redirect.ztst
+++ b/Test/A04redirect.ztst
@@ -555,3 +555,34 @@
 0:Assignment with exec used for redirection: POSIX_BUILTINS
 >x=And this
 ?This should appear, too
+
+  fn-two-heres() {
+# tabs below
+    cat <<-x <<-y
+	foo
+	x
+	bar
+	y
+  }
+  which -x2 fn-two-heres
+  fn-two-heres
+  eval "$(which -x2 fn-two-heres)"
+  fn-two-heres
+  print $functions[fn-two-heres]
+0:Two here-documents in a line are shown correctly.
+>fn-two-heres () {
+>  cat <<x <<y
+>foo
+>x
+>bar
+>y
+>}
+>foo
+>bar
+>foo
+>bar
+>	cat <<x <<y
+>foo
+>x
+>bar
+>y