diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-20 15:02:42 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-20 15:02:42 +0200 |
commit | 66250c932e8a0e3c43e7c7c7b1dbede040b9c508 (patch) | |
tree | 485324d99b96692841c3f44ad0f76b4c67be4d49 /src/testdir/test_vim9_script.vim | |
parent | 93ad14710bdf77591f927a2b244bba6a8cbc7706 (diff) |
patch 8.2.1491: Vim9: crash when compiling heredoc lines start with commentv8.2.1491
Problem: Vim9: crash when compiling heredoc lines start with comment.
Solution: Skip over NULL pointers. Do not remove comment and empty lines
when fetching function lines. (closes #6743)
Diffstat (limited to 'src/testdir/test_vim9_script.vim')
-rw-r--r-- | src/testdir/test_vim9_script.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim index 18e64105f0..d442dc2548 100644 --- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -1141,6 +1141,17 @@ def Test_list_vimscript() assert_equal(['one', 'two', 'three'], mylist) END CheckScriptSuccess(lines) + + # check all lines from heredoc are kept + lines =<< trim END + # comment 1 + two + # comment 3 + + five + # comment 6 + END + assert_equal(['# comment 1', 'two', '# comment 3', '', 'five', '# comment 6'], lines) enddef if has('channel') |