summaryrefslogtreecommitdiff
path: root/src/testdir/test_tcl.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-04-14 20:15:49 +0200
committerBram Moolenaar <Bram@vim.org>2020-04-14 20:15:49 +0200
commit6c2b7b8055b96463f78abb70f58c4c6d6d4b9d55 (patch)
tree597e3992bed8691b13c5a2c4a459d2541b9acc18 /src/testdir/test_tcl.vim
parent7a1637f4c00ac3d0cbf894803ada1586a1717470 (diff)
downloadvim-git-6c2b7b8055b96463f78abb70f58c4c6d6d4b9d55.tar.gz
patch 8.2.0578: heredoc for interfaces does not support "trim"v8.2.0578
Problem: Heredoc for interfaces does not support "trim". Solution: Update the script heredoc support to be same as the :let command. (Yegappan Lakshmanan, closes #5916)
Diffstat (limited to 'src/testdir/test_tcl.vim')
-rw-r--r--src/testdir/test_tcl.vim23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/testdir/test_tcl.vim b/src/testdir/test_tcl.vim
index d25c7f14f..7045fc24c 100644
--- a/src/testdir/test_tcl.vim
+++ b/src/testdir/test_tcl.vim
@@ -67,11 +67,11 @@ func Test_vim_buffer()
" Test ::vim::buffer list
call assert_equal('2', TclEval('llength [::vim::buffer list]'))
call assert_equal(b1.' '.b2, TclEval('::vim::buffer list'))
- tcl <<EOF
+ tcl << trim EOF
proc eachbuf { cmd } {
foreach b [::vim::buffer list] { $b command $cmd }
}
-EOF
+ EOF
tcl eachbuf %s/foo/FOO/g
b! Xfoo1
call assert_equal(['FOObar'], getline(1, '$'))
@@ -680,3 +680,22 @@ func Test_set_cursor()
normal j
call assert_equal([2, 5], [line('.'), col('.')])
endfunc
+
+" Test for different syntax for ruby heredoc
+func Test_tcl_heredoc()
+ tcl << END
+::vim::command {let s = "A"}
+END
+ tcl <<
+::vim::command {let s ..= "B"}
+.
+ tcl << trim END
+ ::vim::command {let s ..= "C"}
+ END
+ tcl << trim
+ ::vim::command {let s ..= "D"}
+ .
+ call assert_equal('ABCD', s)
+endfunc
+
+" vim: shiftwidth=2 sts=2 expandtab