Mercurial > vim
comparison src/testdir/test_vim9_script.vim @ 21094:376b520312d6 v8.2.1098
patch 8.2.1098: Vim9: cannot use line break in :throw argument
Commit: https://github.com/vim/vim/commit/006ad48b8a15c3bace741d8caaf3195e592fbe78
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jun 30 20:55:15 2020 +0200
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 30 Jun 2020 21:00:03 +0200 |
parents | bb49b5090a9c |
children | 74e5e212e550 |
comparison
equal
deleted
inserted
replaced
21093:99a602b27e0e | 21094:376b520312d6 |
---|---|
583 | 583 |
584 call CheckDefFailure(['throw'], 'E1015:') | 584 call CheckDefFailure(['throw'], 'E1015:') |
585 call CheckDefFailure(['throw xxx'], 'E1001:') | 585 call CheckDefFailure(['throw xxx'], 'E1001:') |
586 enddef | 586 enddef |
587 | 587 |
588 def Test_throw_vimscript() | |
589 " only checks line continuation | |
590 let lines =<< trim END | |
591 vim9script | |
592 try | |
593 throw 'one' | |
594 .. 'two' | |
595 catch | |
596 assert_equal('onetwo', v:exception) | |
597 endtry | |
598 END | |
599 CheckScriptSuccess(lines) | |
600 enddef | |
601 | |
588 if has('channel') | 602 if has('channel') |
589 let someJob = test_null_job() | 603 let someJob = test_null_job() |
590 | 604 |
591 def FuncWithError() | 605 def FuncWithError() |
592 echomsg g:someJob | 606 echomsg g:someJob |