diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-11-05 15:14:09 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-05 15:14:09 +0800 |
| commit | 45a3e7f6694c66c3577a47c7ff1fb8bfcc2ab7be (patch) | |
| tree | 0a52ff4bcb4eebd88b70e36d51a7797b3105dd96 /src/nvim/testdir | |
| parent | 86fe2c8d94d212af098002ce04c87fb73fdf9c52 (diff) | |
| parent | 30cfdd0ea1f67afed6732ecbcdda9dda72a2b0a0 (diff) | |
| download | rneovim-45a3e7f6694c66c3577a47c7ff1fb8bfcc2ab7be.tar.gz rneovim-45a3e7f6694c66c3577a47c7ff1fb8bfcc2ab7be.tar.bz2 rneovim-45a3e7f6694c66c3577a47c7ff1fb8bfcc2ab7be.zip | |
Merge pull request #20942 from zeertzjq/vim-8.2.5027
vim-patch:8.2.{3252,3919,5027}
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_trycatch.vim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_trycatch.vim b/src/nvim/testdir/test_trycatch.vim index 3dff8fa2d8..8a1d2d3fa7 100644 --- a/src/nvim/testdir/test_trycatch.vim +++ b/src/nvim/testdir/test_trycatch.vim @@ -2221,6 +2221,23 @@ func Test_user_command_throw_in_function_call() unlet g:caught endfunc +" Test that after reporting an uncaught exception there is no error for a +" missing :endif +func Test_after_exception_no_endif_error() + function Throw() + throw "Failure" + endfunction + + function Foo() + if 1 + call Throw() + endif + endfunction + call assert_fails('call Foo()', ['E605:', 'E605:']) + delfunc Throw + delfunc Foo +endfunc + " Test for using throw in a called function with following endtry {{{1 func Test_user_command_function_call_with_endtry() let lines =<< trim END |