Skip to content

Commit

Permalink
patch 8.2.0484: Vim9: some error messages not tested
Browse files Browse the repository at this point in the history
Problem:    Vim9: some error messages not tested.
Solution:   Add more tests.
  • Loading branch information
brammool committed Mar 30, 2020
1 parent d25ec2c commit 92dba36
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/testdir/test_vim9_expr.vim
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand All @@ -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()
Expand Down Expand Up @@ -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:')
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -738,6 +738,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
484,
/**/
483,
/**/
Expand Down

0 comments on commit 92dba36

Please sign in to comment.