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:
@@ -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
|
||||
|
Reference in New Issue
Block a user