diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-09-01 12:22:46 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-01 12:22:46 +0100 |
commit | d83392a43a48c566c0f3b76382a3648584dae32b (patch) | |
tree | ba5c2d376a386d524190fd0f7565c3af1b624701 /src/testdir | |
parent | e42c8dae32f3575557b83a371c4be66c09afbf7f (diff) |
patch 9.0.0345: error message for list argument could be clearerv9.0.0345
Problem: Error message for list argument could be clearer.
Solution: Include the argument number. (Yegappan Lakshmanan, closes #11027)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_functions.vim | 9 | ||||
-rw-r--r-- | src/testdir/test_ins_complete.vim | 6 | ||||
-rw-r--r-- | src/testdir/test_match.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_method.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_signs.vim | 4 | ||||
-rw-r--r-- | src/testdir/test_terminal.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_textprop.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_utf8.vim | 2 |
8 files changed, 16 insertions, 13 deletions
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim index 971be40dc4..43eb265d62 100644 --- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -2244,9 +2244,12 @@ func Test_readdir_sort() exe "lang collate" collate " 5) Errors - call assert_fails('call readdir(dir, 1, 1)', 'E715:') + call assert_fails('call readdir(dir, 1, 1)', 'E1206:') call assert_fails('call readdir(dir, 1, #{sorta: 1})') + call assert_fails('call readdir(dir, 1, test_null_dict())', 'E1297:') + call assert_fails('call readdirex(dir, 1, 1)', 'E1206:') call assert_fails('call readdirex(dir, 1, #{sorta: 1})') + call assert_fails('call readdirex(dir, 1, test_null_dict())', 'E1297:') " 6) ignore other values in dict let files = readdir(dir, '1', #{sort: 'c'}) @@ -2285,7 +2288,7 @@ endfunc func Test_call() call assert_equal(3, call('len', [123])) call assert_equal(3, 'len'->call([123])) - call assert_fails("call call('len', 123)", 'E714:') + call assert_fails("call call('len', 123)", 'E1211:') call assert_equal(0, call('', [])) call assert_equal(0, call('len', test_null_list())) @@ -2580,7 +2583,7 @@ func Test_range() " list2str() call assert_equal('ABC', list2str(range(65, 67))) - call assert_fails('let s = list2str(5)', 'E474:') + call assert_fails('let s = list2str(5)', 'E1211:') " lock() let thelist = range(5) diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim index 41998aa0eb..cee6a329f7 100644 --- a/src/testdir/test_ins_complete.vim +++ b/src/testdir/test_ins_complete.vim @@ -673,14 +673,14 @@ func Test_complete_func_error() func ListColors() call complete(col('.'), "blue") endfunc - call assert_fails('exe "normal i\<C-R>=ListColors()\<CR>"', 'E474:') + call assert_fails('exe "normal i\<C-R>=ListColors()\<CR>"', 'E1211:') func ListMonths() call complete(col('.'), test_null_list()) endfunc - call assert_fails('exe "normal i\<C-R>=ListMonths()\<CR>"', 'E474:') + call assert_fails('exe "normal i\<C-R>=ListMonths()\<CR>"', 'E1298:') delfunc ListColors delfunc ListMonths - call assert_fails('call complete_info({})', 'E714:') + call assert_fails('call complete_info({})', 'E1211:') call assert_equal([], complete_info(['items']).items) endfunc diff --git a/src/testdir/test_match.vim b/src/testdir/test_match.vim index 45f8389757..f654761d64 100644 --- a/src/testdir/test_match.vim +++ b/src/testdir/test_match.vim @@ -95,7 +95,7 @@ function Test_match() call assert_equal(0, setmatches([])) call assert_equal(0, setmatches([{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 1}])) call clearmatches() - call assert_fails('call setmatches(0)', 'E714:') + call assert_fails('call setmatches(0)', 'E1211:') call assert_fails('call setmatches([0])', 'E474:') call assert_fails("call setmatches([{'wrong key': 'wrong value'}])", 'E474:') call assert_equal(-1, setmatches([{'group' : 'Search', 'priority' : 10, 'id' : 5, 'pos1' : {}}])) diff --git a/src/testdir/test_method.vim b/src/testdir/test_method.vim index 22a930c5f2..d31cce1876 100644 --- a/src/testdir/test_method.vim +++ b/src/testdir/test_method.vim @@ -52,7 +52,7 @@ func Test_dict_method() call assert_fails("let x = d->insert(0)", 'E899:') call assert_true(d->has_key('two')) call assert_equal([['one', 1], ['two', 2], ['three', 3]], d->items()) - call assert_fails("let x = d->join()", 'E714:') + call assert_fails("let x = d->join()", 'E1211:') call assert_equal(['one', 'two', 'three'], d->keys()) call assert_equal(3, d->len()) call assert_equal(#{one: 2, two: 3, three: 4}, d->map('v:val + 1')) diff --git a/src/testdir/test_signs.vim b/src/testdir/test_signs.vim index e23d9ac595..e2387b28c7 100644 --- a/src/testdir/test_signs.vim +++ b/src/testdir/test_signs.vim @@ -2010,7 +2010,7 @@ func Test_sign_funcs_multi() " Invalid arguments call assert_equal([], sign_placelist([])) - call assert_fails('call sign_placelist({})', "E714:") + call assert_fails('call sign_placelist({})', "E1211:") call assert_fails('call sign_placelist([[]])', "E715:") call assert_fails('call sign_placelist(["abc"])', "E715:") call assert_fails('call sign_placelist([100])', "E715:") @@ -2021,7 +2021,7 @@ func Test_sign_funcs_multi() " Invalid arguments call assert_equal([], []->sign_unplacelist()) - call assert_fails('call sign_unplacelist({})', "E714:") + call assert_fails('call sign_unplacelist({})', "E1211:") call assert_fails('call sign_unplacelist([[]])', "E715:") call assert_fails('call sign_unplacelist(["abc"])', "E715:") call assert_fails('call sign_unplacelist([100])', "E715:") diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index d325f1966b..93cb74d2a0 100644 --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -2065,7 +2065,7 @@ func Test_terminal_ansicolors_func() let colors[4] = 'Invalid' call assert_fails('call term_setansicolors(buf, colors)', 'E254:') - call assert_fails('call term_setansicolors(buf, {})', 'E714:') + call assert_fails('call term_setansicolors(buf, {})', 'E1211:') set tgc& call StopShellInTerminal(buf) diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim index 34fa6c93fc..03ae9c97e0 100644 --- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -381,7 +381,7 @@ func Test_prop_add_list() call assert_fails('call prop_add_list(#{type: "one"}, [[2, 2, 2, 2], [3, 20, 3, 22]])', 'E964:') call assert_fails('eval #{type: "one"}->prop_add_list([[2, 2, 2, 2], [3, 20, 3, 22]])', 'E964:') call assert_fails('call prop_add_list(test_null_dict(), [[2, 2, 2]])', 'E965:') - call assert_fails('call prop_add_list(#{type: "one"}, test_null_list())', 'E714:') + call assert_fails('call prop_add_list(#{type: "one"}, test_null_list())', 'E1298:') call assert_fails('call prop_add_list(#{type: "one"}, [test_null_list()])', 'E714:') call DeletePropTypes() bw! diff --git a/src/testdir/test_utf8.vim b/src/testdir/test_utf8.vim index 862e73b9ab..bb99cb3e60 100644 --- a/src/testdir/test_utf8.vim +++ b/src/testdir/test_utf8.vim @@ -168,7 +168,7 @@ func Test_setcellwidths() call setcellwidths([]) - call assert_fails('call setcellwidths(1)', 'E714:') + call assert_fails('call setcellwidths(1)', 'E1211:') call assert_fails('call setcellwidths([1, 2, 0])', 'E1109:') |