aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2021-10-09 02:13:49 +0100
committerzeertzjq <zeertzjq@outlook.com>2022-04-13 21:15:24 +0800
commita25c35d6e409398a8d8304210784e020c262aec5 (patch)
treec23b6cf9253f9ccc8da6eb14286ea88ede3fb4fc /src/nvim/testdir
parent93c72d866b3a41c429dd9d278cda7059ebd4afba (diff)
downloadrneovim-a25c35d6e409398a8d8304210784e020c262aec5.tar.gz
rneovim-a25c35d6e409398a8d8304210784e020c262aec5.tar.bz2
rneovim-a25c35d6e409398a8d8304210784e020c262aec5.zip
vim-patch:8.2.3470: crash with error in :catch and also in :finally
Problem: Crash with error in :catch and also in :finally. Solution: Only discard an exception if there is one. (closes vim/vim#8954) https://github.com/vim/vim/commit/a684a684096ecef3fbaee39c573b47423235d6b1
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_trycatch.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_trycatch.vim b/src/nvim/testdir/test_trycatch.vim
index e7b163c94b..f625f52906 100644
--- a/src/nvim/testdir/test_trycatch.vim
+++ b/src/nvim/testdir/test_trycatch.vim
@@ -2045,6 +2045,18 @@ func Test_user_command_function_call_with_endtry()
call delete('XtestThrow')
endfunc
+func ThisWillFail()
+ try
+ if x | endif
+ catch
+ for l in []
+ finally
+endfunc
+
+func Test_error_in_catch_and_finally()
+ call assert_fails('call ThisWillFail()', ['E121:', 'E600:'])
+endfunc
+
" Modeline {{{1
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker