mirror of
https://github.com/vim/vim.git
synced 2025-10-02 05:04:20 -04:00
patch 8.2.2506: Vim9: :continue does not work correctly in a :try block
Problem: Vim9: :continue does not work correctly in a :try block Solution: Add the TRYCLEANUP instruction. (closes #7827)
This commit is contained in:
@@ -2201,6 +2201,23 @@ def Test_for_loop_unpack()
|
||||
CheckDefExecFailure(lines, 'E1017:', 1)
|
||||
enddef
|
||||
|
||||
def Test_for_loop_with_try_continue()
|
||||
var looped = 0
|
||||
var cleanup = 0
|
||||
for i in range(3)
|
||||
looped += 1
|
||||
try
|
||||
eval [][0]
|
||||
catch
|
||||
continue
|
||||
finally
|
||||
cleanup += 1
|
||||
endtry
|
||||
endfor
|
||||
assert_equal(3, looped)
|
||||
assert_equal(3, cleanup)
|
||||
enddef
|
||||
|
||||
def Test_while_loop()
|
||||
var result = ''
|
||||
var cnt = 0
|
||||
|
Reference in New Issue
Block a user