comparison 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
comparison
equal deleted inserted replaced
23184:37634ffb6d1a 23185:055fa9db6f39
3056 3056
3057 def Test_put_with_linebreak() 3057 def Test_put_with_linebreak()
3058 new 3058 new
3059 var lines =<< trim END 3059 var lines =<< trim END
3060 vim9script 3060 vim9script
3061 pu=split('abc', '\zs') 3061 pu =split('abc', '\zs')
3062 ->join() 3062 ->join()
3063 END 3063 END
3064 CheckScriptSuccess(lines) 3064 CheckScriptSuccess(lines)
3065 getline(2)->assert_equal('a b c') 3065 getline(2)->assert_equal('a b c')
3066 bwipe! 3066 bwipe!
3077 feedkeys("V\<F3>", 'xt') 3077 feedkeys("V\<F3>", 'xt')
3078 assert_equal(['bbb', 'aaa'], getline(1, 2)) 3078 assert_equal(['bbb', 'aaa'], getline(1, 2))
3079 xunmap <F3> 3079 xunmap <F3>
3080 enddef 3080 enddef
3081 3081
3082 def Test_white_space_after_command()
3083 var lines =<< trim END
3084 exit_cb: Func})
3085 END
3086 CheckDefAndScriptFailure(lines, 'E1144:', 1)
3087 enddef
3088
3082 " Keep this last, it messes up highlighting. 3089 " Keep this last, it messes up highlighting.
3083 def Test_substitute_cmd() 3090 def Test_substitute_cmd()
3084 new 3091 new
3085 setline(1, 'something') 3092 setline(1, 'something')
3086 :substitute(some(other( 3093 :substitute(some(other(