mirror of
https://github.com/vim/vim.git
synced 2025-07-24 10:45:12 -04:00
patch 8.2.0484: Vim9: some error messages not tested
Problem: Vim9: some error messages not tested. Solution: Add more tests.
This commit is contained in:
parent
d25ec2cfa0
commit
92dba36fc8
@ -522,6 +522,7 @@ func Test_expr5_fails()
|
||||
call CheckDefFailure("let x = 33 + 0z1122", 'E1035')
|
||||
call CheckDefFailure("let x = [3] + 0z1122", 'E1035')
|
||||
call CheckDefFailure("let x = 'asdf' + 0z1122", 'E1035')
|
||||
call CheckDefFailure("let x = 6 + xxx", 'E1001')
|
||||
endfunc
|
||||
|
||||
" test multiply, divide, modulo
|
||||
@ -553,6 +554,8 @@ def Test_expr6()
|
||||
assert_equal(5.0, xf[0] + yf[0])
|
||||
assert_equal(6.0, xf[0] * yf[0])
|
||||
endif
|
||||
|
||||
call CheckDefFailure("let x = 6 * xxx", 'E1001')
|
||||
enddef
|
||||
|
||||
def Test_expr6_float()
|
||||
@ -680,6 +683,8 @@ def Test_expr7_blob()
|
||||
assert_equal(g:blob_empty, 0z)
|
||||
assert_equal(g:blob_one, 0z01)
|
||||
assert_equal(g:blob_long, 0z0102.0304)
|
||||
|
||||
call CheckDefFailure("let x = 0z123", 'E973:')
|
||||
enddef
|
||||
|
||||
def Test_expr7_string()
|
||||
@ -691,6 +696,9 @@ def Test_expr7_string()
|
||||
assert_equal(g:string_long, 'abcdefghijklm')
|
||||
assert_equal(g:string_long, "abcdefghijklm")
|
||||
assert_equal(g:string_special, "ab\ncd\ref\ekk")
|
||||
|
||||
call CheckDefFailure('let x = "abc', 'E114:')
|
||||
call CheckDefFailure("let x = 'abc", 'E115:')
|
||||
enddef
|
||||
|
||||
def Test_expr7_special()
|
||||
@ -738,6 +746,7 @@ def Test_expr7_dict()
|
||||
call CheckDefFailure("let x = {'a': xxx}", 'E1001:')
|
||||
call CheckDefFailure("let x = {xxx: 8}", 'E1001:')
|
||||
call CheckDefFailure("let x = #{a: 1, a: 2}", 'E721:')
|
||||
call CheckDefFailure("let x = #", 'E1015:')
|
||||
call CheckDefFailure("let x += 1", 'E1020:')
|
||||
call CheckDefFailure("let x = x + 1", 'E1001:')
|
||||
call CheckDefExecFailure("let x = g:anint.member", 'E715:')
|
||||
|
@ -738,6 +738,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
484,
|
||||
/**/
|
||||
483,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user