mirror of
https://github.com/vim/vim.git
synced 2025-10-05 05:34:07 -04: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:
@@ -219,11 +219,11 @@ endfunc
|
||||
|
||||
func Test_stdio()
|
||||
redir =>l:out
|
||||
perl <<EOF
|
||||
perl << trim EOF
|
||||
VIM::Msg("&VIM::Msg");
|
||||
print "STDOUT";
|
||||
print STDERR "STDERR";
|
||||
EOF
|
||||
EOF
|
||||
redir END
|
||||
call assert_equal(['&VIM::Msg', 'STDOUT', 'STDERR'], split(l:out, "\n"))
|
||||
endfunc
|
||||
@@ -290,3 +290,22 @@ func Test_set_cursor()
|
||||
normal j
|
||||
call assert_equal([2, 6], [line('.'), col('.')])
|
||||
endfunc
|
||||
|
||||
" Test for various heredoc syntax
|
||||
func Test_perl_heredoc()
|
||||
perl << END
|
||||
VIM::DoCommand('let s = "A"')
|
||||
END
|
||||
perl <<
|
||||
VIM::DoCommand('let s ..= "B"')
|
||||
.
|
||||
perl << trim END
|
||||
VIM::DoCommand('let s ..= "C"')
|
||||
END
|
||||
perl << trim
|
||||
VIM::DoCommand('let s ..= "D"')
|
||||
.
|
||||
call assert_equal('ABCD', s)
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
Reference in New Issue
Block a user