# HG changeset patch # User Bram Moolenaar # Date 1585596604 -7200 # Node ID 90eec641cc8ce8aab86c06cb882c0bb48299674e # Parent 520dedb83f15022961ea34d34f54dfc6b0a9b821 patch 8.2.0484: Vim9: some error messages not tested Commit: https://github.com/vim/vim/commit/92dba36fc8742fdb51b16d9bb967ef184b4babc1 Author: Bram Moolenaar Date: Mon Mar 30 21:22:56 2020 +0200 patch 8.2.0484: Vim9: some error messages not tested Problem: Vim9: some error messages not tested. Solution: Add more tests. diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim --- a/src/testdir/test_vim9_expr.vim +++ b/src/testdir/test_vim9_expr.vim @@ -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:') diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -739,6 +739,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 484, +/**/ 483, /**/ 482,