0
0
mirror of https://github.com/vim/vim.git synced 2025-10-01 04:54:07 -04:00

patch 8.2.3078: Vim9: profile test fails

Problem:    Vim9: profile test fails.
Solution:   Make throw in :catch jump to :finally.
This commit is contained in:
Bram Moolenaar
2021-06-30 20:39:15 +02:00
parent d3d8feeb89
commit 834193afd7
4 changed files with 39 additions and 4 deletions

View File

@@ -803,6 +803,25 @@ def Test_try_catch_nested()
endtry
endtry
assert_equal(['1', '2', '3', '4', '5', '6'], l)
l = []
try
try
l->add('1')
throw 'foo'
l->add('x')
catch
l->add('2')
throw 'bar'
l->add('x')
finally
l->add('3')
endtry
l->add('x')
catch /bar/
l->add('4')
endtry
assert_equal(['1', '2', '3', '4'], l)
enddef
def TryOne(): number