1
0
forked from aniani/vim

patch 9.0.2059: outstanding exceptions may be skipped

Problem:  outstanding exceptions may be skipped
Solution: When restoring exception state, process remaining outstanding
          exceptions

closes: #13386

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
Yegappan Lakshmanan
2023-10-21 11:59:42 +02:00
committed by Christian Brabandt
parent a36acb7ac4
commit 0ab500dede
9 changed files with 173 additions and 18 deletions

View File

@@ -8347,10 +8347,10 @@ def Test_class_variable_as_operands()
public static TruthyFn: func
static list: list<any> = []
static four: number = 4
static hello: string = 'hello'
static str: string = 'hello'
static def Hello(): string
return hello
static def Str(): string
return str
enddef
static def Four(): number
@@ -8374,8 +8374,17 @@ def Test_class_variable_as_operands()
assert_equal(16, 1 << Tests.four)
assert_equal(8, Tests.four + four)
assert_equal(8, four + Tests.four)
assert_equal('hellohello', Tests.hello .. hello)
assert_equal('hellohello', hello .. Tests.hello)
assert_equal('hellohello', Tests.str .. str)
assert_equal('hellohello', str .. Tests.str)
# Using class variable for list indexing
var l = range(10)
assert_equal(4, l[Tests.four])
assert_equal([4, 5, 6], l[Tests.four : Tests.four + 2])
# Using class variable for Dict key
var d = {hello: 'abc'}
assert_equal('abc', d[Tests.str])
enddef
endclass
@@ -8390,8 +8399,17 @@ def Test_class_variable_as_operands()
assert_equal(16, 1 << Tests.four)
assert_equal(8, Tests.four + Tests.Four())
assert_equal(8, Tests.Four() + Tests.four)
assert_equal('hellohello', Tests.hello .. Tests.Hello())
assert_equal('hellohello', Tests.Hello() .. Tests.hello)
assert_equal('hellohello', Tests.str .. Tests.Str())
assert_equal('hellohello', Tests.Str() .. Tests.str)
# Using class variable for list indexing
var l = range(10)
assert_equal(4, l[Tests.four])
assert_equal([4, 5, 6], l[Tests.four : Tests.four + 2])
# Using class variable for Dict key
var d = {hello: 'abc'}
assert_equal('abc', d[Tests.str])
enddef
Tests.TruthyFn = Tests.Truthy
@@ -8409,8 +8427,17 @@ def Test_class_variable_as_operands()
assert_equal(16, 1 << Tests.four)
assert_equal(8, Tests.four + Tests.Four())
assert_equal(8, Tests.Four() + Tests.four)
assert_equal('hellohello', Tests.hello .. Tests.Hello())
assert_equal('hellohello', Tests.Hello() .. Tests.hello)
assert_equal('hellohello', Tests.str .. Tests.Str())
assert_equal('hellohello', Tests.Str() .. Tests.str)
# Using class variable for list indexing
var l = range(10)
assert_equal(4, l[Tests.four])
assert_equal([4, 5, 6], l[Tests.four : Tests.four + 2])
# Using class variable for Dict key
var d = {hello: 'abc'}
assert_equal('abc', d[Tests.str])
END
v9.CheckSourceSuccess(lines)
enddef