0
0
mirror of https://github.com/vim/vim.git synced 2025-09-30 04:44:14 -04:00

patch 8.2.1098: Vim9: cannot use line break in :throw argument

Problem:    Vim9: cannot use line break in :throw argument.
Solution:   Check for line break.
This commit is contained in:
Bram Moolenaar
2020-06-30 20:55:15 +02:00
parent e46a440505
commit 006ad48b8a
3 changed files with 26 additions and 2 deletions

View File

@@ -585,6 +585,20 @@ def Test_try_catch_fails()
call CheckDefFailure(['throw xxx'], 'E1001:')
enddef
def Test_throw_vimscript()
" only checks line continuation
let lines =<< trim END
vim9script
try
throw 'one'
.. 'two'
catch
assert_equal('onetwo', v:exception)
endtry
END
CheckScriptSuccess(lines)
enddef
if has('channel')
let someJob = test_null_job()