mirror of
https://github.com/zoriya/vim.git
synced 2026-05-27 08:43:02 +00:00
patch 8.2.0578: heredoc for interfaces does not support "trim"
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)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user