Mercurial > vim
diff src/testdir/test_vim9_script.vim @ 23185:055fa9db6f39 v8.2.2138
patch 8.2.2138: Vim9: "exit_cb" causes Vim to exit
Commit: https://github.com/vim/vim/commit/b5b9480ee936ef4cd0e350c468ef8c5f42fa398b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 13 17:50:20 2020 +0100
patch 8.2.2138: Vim9: "exit_cb" causes Vim to exit
Problem: Vim9: "exit_cb" causes Vim to exit.
Solution: Require white space after a command in Vim9 script. (closes https://github.com/vim/vim/issues/7467)
Also fix that Vim9 style heredoc was not always recognized.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 13 Dec 2020 18:00:04 +0100 |
parents | 4d5d12138b36 |
children | 4ba101403fa2 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -3058,7 +3058,7 @@ def Test_put_with_linebreak() new var lines =<< trim END vim9script - pu=split('abc', '\zs') + pu =split('abc', '\zs') ->join() END CheckScriptSuccess(lines) @@ -3079,6 +3079,13 @@ def Test_invoke_normal_in_visual_mode() xunmap <F3> enddef +def Test_white_space_after_command() + var lines =<< trim END + exit_cb: Func}) + END + CheckDefAndScriptFailure(lines, 'E1144:', 1) +enddef + " Keep this last, it messes up highlighting. def Test_substitute_cmd() new