diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2022-09-02 15:15:27 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-02 15:15:27 +0100 |
commit | 8deb2b30c77035bb682ccf80b781455ac1d6038b (patch) | |
tree | 66a1d18ad9971c123f42bd7879c56706e19be73b /src/testdir | |
parent | 119167265ebc7eced210a7f8ed2f4b90378f98f1 (diff) |
patch 9.0.0359: error message for wrong argument type is not specificv9.0.0359
Problem: Error message for wrong argument type is not specific.
Solution: Include more information in the error. (Yegappan Lakshmanan,
closes #11037)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_assert.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_cmdline.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_functions.vim | 14 | ||||
-rw-r--r-- | src/testdir/test_listdict.vim | 12 | ||||
-rw-r--r-- | src/testdir/test_signs.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_tagjump.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_timers.vim | 4 | ||||
-rw-r--r-- | src/testdir/test_vim9_builtin.vim | 4 |
8 files changed, 21 insertions, 21 deletions
diff --git a/src/testdir/test_assert.vim b/src/testdir/test_assert.vim index 7c9d090b39..f11a3a9365 100644 --- a/src/testdir/test_assert.vim +++ b/src/testdir/test_assert.vim @@ -368,7 +368,7 @@ func Test_override() eval 1->test_override('redraw') call test_override('ALL', 0) call assert_fails("call test_override('xxx', 1)", 'E475:') - call assert_fails("call test_override('redraw', 'yes')", 'E474:') + call assert_fails("call test_override('redraw', 'yes')", 'E1210:') endfunc func Test_mouse_position() diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index bec0f5fdf8..335e756d6f 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -605,7 +605,7 @@ func Test_getcompletion() call assert_fails("call getcompletion('\\\\@!\\\\@=', 'buffer')", 'E871:') call assert_fails('call getcompletion("", "burp")', 'E475:') - call assert_fails('call getcompletion("abc", [])', 'E475:') + call assert_fails('call getcompletion("abc", [])', 'E1174:') endfunc " Test for getcompletion() with "fuzzy" in 'wildoptions' diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim index 43eb265d62..e05268a746 100644 --- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -1247,11 +1247,11 @@ func Test_charidx() call assert_equal(-1, charidx(a, 8, 1)) call assert_equal(-1, charidx('', 0, 1)) - call assert_fails('let x = charidx([], 1)', 'E474:') - call assert_fails('let x = charidx("abc", [])', 'E474:') - call assert_fails('let x = charidx("abc", 1, [])', 'E474:') - call assert_fails('let x = charidx("abc", 1, -1)', 'E1023:') - call assert_fails('let x = charidx("abc", 1, 2)', 'E1023:') + call assert_fails('let x = charidx([], 1)', 'E1174:') + call assert_fails('let x = charidx("abc", [])', 'E1210:') + call assert_fails('let x = charidx("abc", 1, [])', 'E1212:') + call assert_fails('let x = charidx("abc", 1, -1)', 'E1212:') + call assert_fails('let x = charidx("abc", 1, 2)', 'E1212:') endfunc func Test_count() @@ -1738,7 +1738,7 @@ func Test_trim() call assert_fails('eval trim(" vim ", " ", [])', 'E745:') call assert_fails('eval trim(" vim ", " ", -1)', 'E475:') call assert_fails('eval trim(" vim ", " ", 3)', 'E475:') - call assert_fails('eval trim(" vim ", 0)', 'E475:') + call assert_fails('eval trim(" vim ", 0)', 'E1174:') let chars = join(map(range(1, 0x20) + [0xa0], {n -> n->nr2char()}), '') call assert_equal("x", trim(chars . "x" . chars)) @@ -2913,7 +2913,7 @@ endfunc " Test for gettext() func Test_gettext() - call assert_fails('call gettext(1)', 'E475:') + call assert_fails('call gettext(1)', 'E1174:') endfunc func Test_builtin_check() diff --git a/src/testdir/test_listdict.vim b/src/testdir/test_listdict.vim index 154aa9875d..bf3117bbbd 100644 --- a/src/testdir/test_listdict.vim +++ b/src/testdir/test_listdict.vim @@ -568,7 +568,7 @@ func Test_dict_deepcopy() END call v9.CheckLegacyAndVim9Success(lines) - call assert_fails("call deepcopy([1, 2], 2)", 'E1023:') + call assert_fails("call deepcopy([1, 2], 2)", 'E1212:') endfunc " Locked variables @@ -1044,16 +1044,16 @@ func Test_reduce() call assert_fails("call reduce({}, { acc, val -> acc + val }, 1)", 'E1098:') call assert_fails("call reduce(0, { acc, val -> acc + val }, 1)", 'E1098:') call assert_fails("call reduce([1, 2], 'Xdoes_not_exist')", 'E117:') - call assert_fails("echo reduce(0z01, { acc, val -> 2 * acc + val }, '')", 'E39:') + call assert_fails("echo reduce(0z01, { acc, val -> 2 * acc + val }, '')", 'E1210:') call assert_fails("vim9 reduce(0, (acc, val) => (acc .. val), '')", 'E1252:') call assert_fails("vim9 reduce({}, (acc, val) => (acc .. val), '')", 'E1252:') call assert_fails("vim9 reduce(0.1, (acc, val) => (acc .. val), '')", 'E1252:') call assert_fails("vim9 reduce(function('tr'), (acc, val) => (acc .. val), '')", 'E1252:') - call assert_fails("call reduce('', { acc, val -> acc + val }, 1)", 'E1253:') - call assert_fails("call reduce('', { acc, val -> acc + val }, {})", 'E1253:') - call assert_fails("call reduce('', { acc, val -> acc + val }, 0.1)", 'E1253:') - call assert_fails("call reduce('', { acc, val -> acc + val }, function('tr'))", 'E1253:') + call assert_fails("call reduce('', { acc, val -> acc + val }, 1)", 'E1174:') + call assert_fails("call reduce('', { acc, val -> acc + val }, {})", 'E1174:') + call assert_fails("call reduce('', { acc, val -> acc + val }, 0.1)", 'E1174:') + call assert_fails("call reduce('', { acc, val -> acc + val }, function('tr'))", 'E1174:') call assert_fails("call reduce('abc', { a, v -> a10}, '')", 'E121:') call assert_fails("call reduce(0z0102, { a, v -> a10}, 1)", 'E121:') call assert_fails("call reduce([1, 2], { a, v -> a10}, '')", 'E121:') diff --git a/src/testdir/test_signs.vim b/src/testdir/test_signs.vim index e2387b28c7..790d9b4379 100644 --- a/src/testdir/test_signs.vim +++ b/src/testdir/test_signs.vim @@ -686,7 +686,7 @@ func Test_sign_group() call assert_equal([], sign_getplaced(bnum, {'group' : '*'})[0].signs) " Error case - call assert_fails("call sign_unplace({})", 'E474:') + call assert_fails("call sign_unplace({})", 'E1174:') " Place a sign in the global group and try to delete it using a group call assert_equal(5, sign_place(5, '', 'sign1', bnum, {'lnum' : 10})) diff --git a/src/testdir/test_tagjump.vim b/src/testdir/test_tagjump.vim index cca907f3b2..81606fcf7c 100644 --- a/src/testdir/test_tagjump.vim +++ b/src/testdir/test_tagjump.vim @@ -405,7 +405,7 @@ func Test_getsettagstack() call assert_equal(-1, settagstack(100, {'items' : []})) call assert_fails('call settagstack(1, [1, 10])', 'E1206:') call assert_fails("call settagstack(1, {'items' : 10})", 'E714:') - call assert_fails("call settagstack(1, {'items' : []}, 10)", 'E928:') + call assert_fails("call settagstack(1, {'items' : []}, 10)", 'E1174:') call assert_fails("call settagstack(1, {'items' : []}, 'b')", 'E962:') call assert_equal(-1, settagstack(0, test_null_dict())) diff --git a/src/testdir/test_timers.vim b/src/testdir/test_timers.vim index 85e76eb863..2625013ae4 100644 --- a/src/testdir/test_timers.vim +++ b/src/testdir/test_timers.vim @@ -116,7 +116,7 @@ func Test_timer_info() call timer_stop(id) call assert_equal([], timer_info(id)) - call assert_fails('call timer_info("abc")', 'E39:') + call assert_fails('call timer_info("abc")', 'E1210:') " check repeat count inside the callback let g:timer_repeat = [] @@ -267,7 +267,7 @@ func Test_timer_errors() call assert_fails('call timer_start(100, "MyHandler", "abc")', 'E1206:') call assert_fails('call timer_start(100, [])', 'E921:') - call assert_fails('call timer_stop("abc")', 'E39:') + call assert_fails('call timer_stop("abc")', 'E1210:') endfunc func FuncWithCaughtError(timer) diff --git a/src/testdir/test_vim9_builtin.vim b/src/testdir/test_vim9_builtin.vim index 13f87cb8e5..b74a8eced2 100644 --- a/src/testdir/test_vim9_builtin.vim +++ b/src/testdir/test_vim9_builtin.vim @@ -1961,9 +1961,9 @@ enddef def Test_gettext() v9.CheckDefAndScriptFailure(['gettext(10)'], ['E1013: Argument 1: type mismatch, expected string but got number', 'E1174: String required for argument 1']) - v9.CheckDefExecAndScriptFailure(['gettext("")'], 'E475: Invalid argument') + v9.CheckDefExecAndScriptFailure(['gettext("")'], 'E1175: Non-empty string required for argument 1') assert_equal('abc', gettext("abc")) - assert_fails('gettext("")', 'E475:') + assert_fails('gettext("")', 'E1175:') enddef def Test_getwininfo() |