mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 8.2.1755: Vim9: crash when using invalid heredoc marker
Problem: Vim9: crash when using invalid heredoc marker. (Dhiraj Mishra) Solution: Check for NULL list. (closes #7027) Fix comment character.
This commit is contained in:
@@ -732,4 +732,14 @@ def Test_assign_lambda()
|
||||
CheckScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
def Test_heredoc()
|
||||
var lines =<< trim END # comment
|
||||
text
|
||||
END
|
||||
assert_equal(['text'], lines)
|
||||
|
||||
CheckDefFailure(['var lines =<< trim END X', 'END'], 'E488:')
|
||||
CheckDefFailure(['var lines =<< trim END " comment', 'END'], 'E488:')
|
||||
enddef
|
||||
|
||||
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
|
||||
|
Reference in New Issue
Block a user