diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-09-04 21:18:46 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-09-04 21:18:46 +0200 |
commit | e2e4075fad1326181edc5a131e48c644ef613693 (patch) | |
tree | f3749b559e690b3e8e80990441aeb6459d955fce /src | |
parent | 24f7750ffa9730579736d779b7cc94faff325fc1 (diff) |
patch 8.2.1593: tests do not check the error number properlyv8.2.1593
Problem: Tests do not check the error number properly.0
Solution: Add a colon after the error number. (closes #6869)
Diffstat (limited to 'src')
43 files changed, 172 insertions, 170 deletions
diff --git a/src/testdir/test_assert.vim b/src/testdir/test_assert.vim index a3b45a1700..1a18799f5d 100644 --- a/src/testdir/test_assert.vim +++ b/src/testdir/test_assert.vim @@ -341,8 +341,8 @@ func Test_override() call test_override('char_avail', 1) 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('xxx', 1)", 'E475:') + call assert_fails("call test_override('redraw', 'yes')", 'E474:') endfunc func Test_mouse_position() diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim index 73674a2887..b7067a773a 100644 --- a/src/testdir/test_autocmd.vim +++ b/src/testdir/test_autocmd.vim @@ -468,7 +468,7 @@ func Test_autocmd_bufwipe_in_SessLoadPost() call writefile(content, 'Xvimrc') call system(GetVimCommand('Xvimrc') .. ' --not-a-term --noplugins -S Session.vim -c cq') let errors = join(readfile('Xerrors')) - call assert_match('E814', errors) + call assert_match('E814:', errors) set swapfile for file in ['Session.vim', 'Xvimrc', 'Xerrors'] @@ -638,7 +638,7 @@ func Test_OptionSet() " try twice, first time, shouldn't trigger because option name is invalid, " second time, it should trigger let bnum = bufnr('%') - call assert_fails("call setbufvar(bnum, '&l:bk', 1)", "E355") + call assert_fails("call setbufvar(bnum, '&l:bk', 1)", 'E355:') " should trigger, use correct option name call setbufvar(bnum, '&backup', 1) call assert_equal([], g:options) @@ -1175,15 +1175,15 @@ func Test_OptionSet_diffmode_close() au OptionSet diff close call setline(1, ['buffer 1', 'line2', 'line3', 'line4']) - call assert_fails(':diffthis', 'E788') + call assert_fails(':diffthis', 'E788:') call assert_equal(1, &diff) vnew call setline(1, ['buffer 2', 'line 2', 'line 3', 'line4']) - call assert_fails(':diffthis', 'E788') + call assert_fails(':diffthis', 'E788:') call assert_equal(1, &diff) set diffopt-=closeoff bw! - call assert_fails(':diffoff!', 'E788') + call assert_fails(':diffoff!', 'E788:') bw! " Cleanup @@ -1410,13 +1410,13 @@ func Test_BufWritePre() bdel Xtest e Xxx1 " write it, will unload it and give an error msg - call assert_fails('w', 'E203') + call assert_fails('w', 'E203:') call assert_equal('Xxx2', bufname('%')) edit Xtest e! Xxx2 bwipe Xtest " write it, will delete the buffer and give an error msg - call assert_fails('w', 'E203') + call assert_fails('w', 'E203:') call assert_equal('Xxx1', bufname('%')) au! BufWritePre call delete('Xxx1') @@ -1491,7 +1491,7 @@ func Test_Cmd_Autocmds() au BufWriteCmd XtestA call append(line("$"), "write") write " will append a line to the file call assert_equal('write', getline('$')) - call assert_fails('read XtestA', 'E484') " should not read anything + call assert_fails('read XtestA', 'E484:') " should not read anything call assert_equal('write', getline(4)) " now we have: @@ -1517,7 +1517,7 @@ func Test_Cmd_Autocmds() normal 4GA1 4,5w XtestC " will copy lines 4 and 5 to the end call assert_equal("\tabc21", getline(8)) - call assert_fails('r XtestC', 'E484') " should not read anything + call assert_fails('r XtestC', 'E484:') " should not read anything call assert_equal("end of Xxx", getline(9)) " now we have: @@ -1535,7 +1535,7 @@ func Test_Cmd_Autocmds() au FileAppendCmd XtestD call extend(g:lines, getline(line("'["), line("']"))) w >>XtestD " will add lines to 'lines' call assert_equal(9, len(g:lines)) - call assert_fails('$r XtestD', 'E484') " should not read anything + call assert_fails('$r XtestD', 'E484:') " should not read anything call assert_equal(9, line('$')) call assert_equal('end of Xxx', getline('$')) @@ -1776,7 +1776,7 @@ func Test_nocatch_wipe_dummy_buffer() CheckFeature quickfix " Nasty autocommand: wipe buffer on any event. au * x bwipe - call assert_fails('lv½ /x', 'E937') + call assert_fails('lv½ /x', 'E937:') au! endfunc diff --git a/src/testdir/test_backspace_opt.vim b/src/testdir/test_backspace_opt.vim index 149d8a8d3a..b7e00242af 100644 --- a/src/testdir/test_backspace_opt.vim +++ b/src/testdir/test_backspace_opt.vim @@ -41,10 +41,10 @@ func Test_backspace_option() set backspace-=eol call assert_equal('', &backspace) " Check the error - call assert_equal(0, match(Exec('set backspace=ABC'), '.*E474')) - call assert_equal(0, match(Exec('set backspace+=def'), '.*E474')) + call assert_equal(0, match(Exec('set backspace=ABC'), '.*E474:')) + call assert_equal(0, match(Exec('set backspace+=def'), '.*E474:')) " NOTE: Vim doesn't check following error... - "call assert_equal(0, match(Exec('set backspace-=ghi'), '.*E474')) + "call assert_equal(0, match(Exec('set backspace-=ghi'), '.*E474:')) " Check backwards compatibility with version 5.4 and earlier set backspace=0 @@ -55,8 +55,8 @@ func Test_backspace_option() call assert_equal('2', &backspace) set backspace=3 call assert_equal('3', &backspace) - call assert_false(match(Exec('set backspace=4'), '.*E474')) - call assert_false(match(Exec('set backspace=10'), '.*E474')) + call assert_false(match(Exec('set backspace=4'), '.*E474:')) + call assert_false(match(Exec('set backspace=10'), '.*E474:')) " Cleared when 'compatible' is set set compatible diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim index 065e8b403b..6fa7e3bfdb 100644 --- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -163,11 +163,11 @@ func Ch_communicate(port) eval handle->ch_setoptions({'callback': 's:NotUsed'}) call ch_setoptions(handle, {'timeout': 1111}) call ch_setoptions(handle, {'mode': 'json'}) - call assert_fails("call ch_setoptions(handle, {'waittime': 111})", "E475") + call assert_fails("call ch_setoptions(handle, {'waittime': 111})", 'E475:') call ch_setoptions(handle, {'callback': ''}) call ch_setoptions(handle, {'drop': 'never'}) call ch_setoptions(handle, {'drop': 'auto'}) - call assert_fails("call ch_setoptions(handle, {'drop': 'bad'})", "E475") + call assert_fails("call ch_setoptions(handle, {'drop': 'bad'})", 'E475:') call assert_equal(0, ch_setoptions(handle, test_null_dict())) call assert_equal(0, ch_setoptions(test_null_channel(), {'drop' : 'never'})) diff --git a/src/testdir/test_clientserver.vim b/src/testdir/test_clientserver.vim index ab80bd2d56..7a750556ab 100644 --- a/src/testdir/test_clientserver.vim +++ b/src/testdir/test_clientserver.vim @@ -70,7 +70,7 @@ func Test_client_server() call WaitForAssert({-> assert_equal('maybe', remote_expr(name, "testvar", "", 2))}) endif - call assert_fails('call remote_send("XXX", ":let testvar = ''yes''\<CR>")', 'E241') + call assert_fails('call remote_send("XXX", ":let testvar = ''yes''\<CR>")', 'E241:') " Expression evaluated locally. if v:servername == '' diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index 6ebfa31c86..628db67a60 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -843,7 +843,7 @@ func Test_cmdline_write_alternatefile() f %< call assert_equal('foo-B', expand('%')) new - call assert_fails('f #<', 'E95') + call assert_fails('f #<', 'E95:') bw! f foo-B.txt f %<-A diff --git a/src/testdir/test_const.vim b/src/testdir/test_const.vim index 107e2503e0..5eb2f69949 100644 --- a/src/testdir/test_const.vim +++ b/src/testdir/test_const.vim @@ -207,9 +207,9 @@ endfunc func Test_lockvar() let x = 'hello' lockvar x - call assert_fails('let x = "there"', 'E741') + call assert_fails('let x = "there"', 'E741:') if 0 | unlockvar x | endif - call assert_fails('let x = "there"', 'E741') + call assert_fails('let x = "there"', 'E741:') unlockvar x let x = 'there' diff --git a/src/testdir/test_cscope.vim b/src/testdir/test_cscope.vim index f4d4208492..9ffe9566f4 100644 --- a/src/testdir/test_cscope.vim +++ b/src/testdir/test_cscope.vim @@ -31,9 +31,9 @@ func Test_cscopeWithCscopeConnections() catch call assert_report('exception thrown') endtry - call assert_fails('cscope add', 'E560') - call assert_fails('cscope add Xcscope.out', 'E568') - call assert_fails('cscope add doesnotexist.out', 'E563') + call assert_fails('cscope add', 'E560:') + call assert_fails('cscope add Xcscope.out', 'E568:') + call assert_fails('cscope add doesnotexist.out', 'E563:') if has('unix') call assert_fails('cscope add /dev/null', 'E564:') endif diff --git a/src/testdir/test_eval_stuff.vim b/src/testdir/test_eval_stuff.vim index 1490ffbc57..316fb42f22 100644 --- a/src/testdir/test_eval_stuff.vim +++ b/src/testdir/test_eval_stuff.vim @@ -35,12 +35,12 @@ func Test_mkdir_p() endtry " 'p' doesn't suppress real errors call writefile([], 'Xfile') - call assert_fails('call mkdir("Xfile", "p")', 'E739') + call assert_fails('call mkdir("Xfile", "p")', 'E739:') call delete('Xfile') call delete('Xmkdir', 'rf') call assert_equal(0, mkdir(test_null_string())) - call assert_fails('call mkdir([])', 'E730') - call assert_fails('call mkdir("abc", [], [])', 'E745') + call assert_fails('call mkdir([])', 'E730:') + call assert_fails('call mkdir("abc", [], [])', 'E745:') endfunc func Test_line_continuation() diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim index 70dc33939a..7ff9b7a819 100644 --- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -2025,7 +2025,7 @@ 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)', 'E715:') call assert_fails('call readdir(dir, 1, #{sorta: 1})') call assert_fails('call readdirex(dir, 1, #{sorta: 1})') diff --git a/src/testdir/test_global.vim b/src/testdir/test_global.vim index ee4808cd97..4a01be4194 100644 --- a/src/testdir/test_global.vim +++ b/src/testdir/test_global.vim @@ -29,7 +29,7 @@ endfunc func Test_nested_global() new call setline(1, ['nothing', 'found', 'found bad', 'bad']) - call assert_fails('g/found/3v/bad/s/^/++/', 'E147') + call assert_fails('g/found/3v/bad/s/^/++/', 'E147:') g/found/v/bad/s/^/++/ call assert_equal(['nothing', '++found', 'found bad', 'bad'], getline(1, 4)) bwipe! diff --git a/src/testdir/test_gui.vim b/src/testdir/test_gui.vim index c01a290ee3..64537ac753 100644 --- a/src/testdir/test_gui.vim +++ b/src/testdir/test_gui.vim @@ -525,7 +525,7 @@ func Test_set_guifontwide() set guifontset=-*-notexist-* call assert_report("'set guifontset=-*-notexist-*' should have failed") catch - call assert_exception('E598') + call assert_exception('E598:') endtry " Set it to an invalid value brutally for preparation. let &guifontset = '-*-notexist-*' diff --git a/src/testdir/test_hlsearch.vim b/src/testdir/test_hlsearch.vim index 58e1d8c636..db54ed4afc 100644 --- a/src/testdir/test_hlsearch.vim +++ b/src/testdir/test_hlsearch.vim @@ -28,7 +28,7 @@ func Test_hlsearch() set nohls exe "normal! /\<CR>" | redraw call assert_notequal(r1, screenattr(1,1)) - call assert_fails('let v:hlsearch=[]', 'E745') + call assert_fails('let v:hlsearch=[]', 'E745:') call garbagecollect(1) call getchar(1) enew! diff --git a/src/testdir/test_lambda.vim b/src/testdir/test_lambda.vim index b43ef521e2..aa734624ad 100644 --- a/src/testdir/test_lambda.vim +++ b/src/testdir/test_lambda.vim @@ -308,7 +308,7 @@ endfunc func Test_lambda_error() " This was causing a crash - call assert_fails('ec{@{->{d->()()', 'E15') + call assert_fails('ec{@{->{d->()()', 'E15:') endfunc func Test_closure_error() diff --git a/src/testdir/test_let.vim b/src/testdir/test_let.vim index 017b2a4a47..6dc36ea96f 100644 --- a/src/testdir/test_let.vim +++ b/src/testdir/test_let.vim @@ -250,23 +250,23 @@ func Test_let_termcap() let &t_k1 = old_t_k1 endif - call assert_fails('let x = &t_xx', 'E113') + call assert_fails('let x = &t_xx', 'E113:') let &t_xx = "yes" call assert_equal("yes", &t_xx) let &t_xx = "" - call assert_fails('let x = &t_xx', 'E113') + call assert_fails('let x = &t_xx', 'E113:') endfunc func Test_let_option_error() let _w = &tw let &tw = 80 - call assert_fails('let &tw .= 1', 'E734') + call assert_fails('let &tw .= 1', 'E734:') call assert_equal(80, &tw) let &tw = _w let _w = &fillchars let &fillchars = "vert:|" - call assert_fails('let &fillchars += "diff:-"', 'E734') + call assert_fails('let &fillchars += "diff:-"', 'E734:') call assert_equal("vert:|", &fillchars) let &fillchars = _w endfunc diff --git a/src/testdir/test_listdict.vim b/src/testdir/test_listdict.vim index 563c79f0d3..8db7b3f168 100644 --- a/src/testdir/test_listdict.vim +++ b/src/testdir/test_listdict.vim @@ -67,7 +67,7 @@ func Test_list_unlet() " removing items out of range: silently skip items that don't exist let l = [0, 1, 2, 3] - call assert_fails('unlet l[2:1]', 'E684') + call assert_fails('unlet l[2:1]', 'E684:') let l = [0, 1, 2, 3] unlet l[2:2] call assert_equal([0, 1, 3], l) @@ -81,7 +81,7 @@ func Test_list_unlet() unlet l[2:5] call assert_equal([0, 1], l) let l = [0, 1, 2, 3] - call assert_fails('unlet l[-1:2]', 'E684') + call assert_fails('unlet l[-1:2]', 'E684:') let l = [0, 1, 2, 3] unlet l[-2:2] call assert_equal([0, 1, 3], l) @@ -104,8 +104,8 @@ func Test_list_assign() let l = [0, 1, 2, 3] let [va, vb] = l[2:3] call assert_equal([2, 3], [va, vb]) - call assert_fails('let [va, vb] = l', 'E687') - call assert_fails('let [va, vb] = l[1:1]', 'E688') + call assert_fails('let [va, vb] = l', 'E687:') + call assert_fails('let [va, vb] = l[1:1]', 'E688:') endfunc " test for range assign @@ -186,7 +186,7 @@ func Test_dict() call extend(d, {3:33, 1:99}) call extend(d, {'b':'bbb', 'c':'ccc'}, "keep") - call assert_fails("call extend(d, {3:333,4:444}, 'error')", 'E737') + call assert_fails("call extend(d, {3:333,4:444}, 'error')", 'E737:') call assert_equal({'c': 'ccc', '1': 99, 'b': [1, 2, function('strlen')], '3': 33, '-1': {'a': 1}}, d) call filter(d, 'v:key =~ ''[ac391]''') call assert_equal({'c': 'ccc', '1': 99, '3': 33, '-1': {'a': 1}}, d) @@ -343,7 +343,7 @@ func Test_dict_deepcopy() let l = [4, d, 6] let d[3] = l let dc = deepcopy(d) - call assert_fails('call deepcopy(d, 1)', 'E698') + call assert_fails('call deepcopy(d, 1)', 'E698:') let l2 = [0, l, l, 3] let l[1] = l2 let l3 = deepcopy(l2) @@ -522,7 +522,7 @@ func Test_dict_lock_unlet() unlet! d let d = {'a': 99, 'b': 100} lockvar 1 d - call assert_fails('unlet d.a', 'E741') + call assert_fails('unlet d.a', 'E741:') endfunc " unlet after lock on dict item @@ -557,7 +557,7 @@ func Test_dict_lock_extend() unlet! d let d = {'a': 99, 'b': 100} lockvar d.a - call assert_fails("call extend(d, {'a' : 123})", 'E741') + call assert_fails("call extend(d, {'a' : 123})", 'E741:') call assert_equal({'a': 99, 'b': 100}, d) endfunc @@ -572,7 +572,7 @@ endfunc " No remove() of write-protected scope-level variable func Tfunc1(this_is_a_long_parameter_name) - call assert_fails("call remove(a:, 'this_is_a_long_parameter_name')", 'E742') + call assert_fails("call remove(a:, 'this_is_a_long_parameter_name')", 'E742:') endfunc func Test_dict_scope_var_remove() call Tfunc1('testval') @@ -580,11 +580,11 @@ endfunc " No extend() of write-protected scope-level variable func Test_dict_scope_var_extend() - call assert_fails("call extend(a:, {'this_is_a_long_parameter_name': 1234})", 'E742') + call assert_fails("call extend(a:, {'this_is_a_long_parameter_name': 1234})", 'E742:') endfunc func Tfunc2(this_is_a_long_parameter_name) - call assert_fails("call extend(a:, {'this_is_a_long_parameter_name': 1234})", 'E742') + call assert_fails("call extend(a:, {'this_is_a_long_parameter_name': 1234})", 'E742:') endfunc func Test_dict_scope_var_extend_overwrite() call Tfunc2('testval') @@ -862,7 +862,7 @@ func s:check_scope_dict(x, fixed) let cmd = s:gen_cmd('let x:foo = 1', a:x) if a:fixed - call assert_fails(cmd, 'E461') + call assert_fails(cmd, 'E461:') else exe cmd exe s:gen_cmd('call assert_equal(1, x:foo)', a:x) @@ -870,7 +870,7 @@ func s:check_scope_dict(x, fixed) let cmd = s:gen_cmd('let x:["bar"] = 2', a:x) if a:fixed - call assert_fails(cmd, 'E461') + call assert_fails(cmd, 'E461:') else exe cmd exe s:gen_cmd('call assert_equal(2, x:bar)', a:x) @@ -878,7 +878,7 @@ func s:check_scope_dict(x, fixed) let cmd = s:gen_cmd('call extend(x:, {"baz": 3})', a:x) if a:fixed - call assert_fails(cmd, 'E742') + call assert_fails(cmd, 'E742:') else exe cmd exe s:gen_cmd('call assert_equal(3, x:baz)', a:x) @@ -886,11 +886,11 @@ func s:check_scope_dict(x, fixed) if a:fixed if a:x ==# 'a' - call assert_fails('unlet a:x', 'E795') - call assert_fails('call remove(a:, "x")', 'E742') + call assert_fails('unlet a:x', 'E795:') + call assert_fails('call remove(a:, "x")', 'E742:') elseif a:x ==# 'v' - call assert_fails('unlet v:count', 'E795') - call assert_fails('call remove(v:, "count")', 'E742') + call assert_fails('unlet v:count', 'E795:') + call assert_fails('call remove(v:, "count")', 'E742:') endif else exe s:gen_cmd('unlet x:foo', a:x) diff --git a/src/testdir/test_move.vim b/src/testdir/test_move.vim index 8c40369dbd..98c766504c 100644 --- a/src/testdir/test_move.vim +++ b/src/testdir/test_move.vim @@ -33,8 +33,8 @@ func Test_move() call assert_true(&modified) set nomodified - call assert_fails('1,2move 1', 'E134') - call assert_fails('2,3move 2', 'E134') + call assert_fails('1,2move 1', 'E134:') + call assert_fails('2,3move 2', 'E134:') call assert_fails("move -100", 'E16:') call assert_fails("move +100", 'E16:') call assert_fails('move', 'E16:') diff --git a/src/testdir/test_normal.vim b/src/testdir/test_normal.vim index 58c9ece68c..76f4dd6490 100644 --- a/src/testdir/test_normal.vim +++ b/src/testdir/test_normal.vim @@ -1265,8 +1265,8 @@ func Test_normal21_nv_hat() " Edit a fresh file and wipe the buffer list so that there is no alternate " file present. Next, check for the expected command failures. edit Xfoo | %bw - call assert_fails(':buffer #', 'E86') - call assert_fails(':execute "normal! \<C-^>"', 'E23') + call assert_fails(':buffer #', 'E86:') + call assert_fails(':execute "normal! \<C-^>"', 'E23:') call assert_fails("normal i\<C-R>#", 'E23:') " Test for the expected behavior when switching between two named buffers. @@ -1942,8 +1942,8 @@ func Test_normal33_g_cmd2() " there is only one change in the changelist " currently, when we setup the window call assert_equal(2, line('.')) - call assert_fails(':norm! g;', 'E662') - call assert_fails(':norm! g,', 'E663') + call assert_fails(':norm! g;', 'E662:') + call assert_fails(':norm! g,', 'E663:') let &ul=&ul call append('$', ['a', 'b', 'c', 'd']) let &ul=&ul @@ -2466,10 +2466,10 @@ func Test_normal45_drop() " unfortunately, without a gui, we can't really test much here, " so simply test that ~p fails (which uses the drop register) new - call assert_fails(':norm! "~p', 'E353') + call assert_fails(':norm! "~p', 'E353:') call assert_equal([], getreg('~', 1, 1)) " the ~ register is read only - call assert_fails(':let @~="1"', 'E354') + call assert_fails(':let @~="1"', 'E354:') bw! endfunc @@ -2510,7 +2510,7 @@ func Test_normal48_wincmd() new exe "norm! \<c-w>c" call assert_equal(1, winnr('$')) - call assert_fails(":norm! \<c-w>c", "E444") + call assert_fails(":norm! \<c-w>c", 'E444:') endfunc func Test_normal49_counts() @@ -2531,7 +2531,7 @@ func Test_normal50_commandline() "call feedkeys("\<c-^>", 'tm') " should also fail with E11 - call assert_fails(":wincmd p", 'E11') + call assert_fails(":wincmd p", 'E11:') " return from commandline window call feedkeys("\<cr>") endfunc @@ -2560,7 +2560,7 @@ func Test_normal51_FileChangedRO() new Xreadonly.log setl ro au FileChangedRO <buffer> :call feedkeys("\<c-^>", 'tix') - call assert_fails(":norm! Af", 'E788') + call assert_fails(":norm! Af", 'E788:') call assert_equal(['foo'], getline(1,'$')) call assert_equal('Xreadonly.log', bufname('')) @@ -2701,7 +2701,7 @@ endfunc func Test_nv_hat_count() %bwipeout! let l:nr = bufnr('%') + 1 - call assert_fails(':execute "normal! ' . l:nr . '\<C-^>"', 'E92') + call assert_fails(':execute "normal! ' . l:nr . '\<C-^>"', 'E92:') edit Xfoo let l:foo_nr = bufnr('Xfoo') diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim index ec4898fa63..a92dc25505 100644 --- a/src/testdir/test_popupwin.vim +++ b/src/testdir/test_popupwin.vim @@ -976,11 +976,11 @@ endfunc func Test_win_execute_closing_curwin() split let winid = popup_create('some text', {}) - call assert_fails('call win_execute(winid, winnr() .. "close")', 'E994') + call assert_fails('call win_execute(winid, winnr() .. "close")', 'E994:') call popup_clear() let winid = popup_create('some text', {}) - call assert_fails('call win_execute(winid, printf("normal! :\<C-u>call popup_close(%d)\<CR>", winid))', 'E994') + call assert_fails('call win_execute(winid, printf("normal! :\<C-u>call popup_close(%d)\<CR>", winid))', 'E994:') call popup_clear() endfunc diff --git a/src/testdir/test_put.vim b/src/testdir/test_put.vim index 6741af1ef9..3d4c5e7230 100644 --- a/src/testdir/test_put.vim +++ b/src/testdir/test_put.vim @@ -60,16 +60,16 @@ func Test_put_fails_when_nomodifiable() setlocal nomodifiable normal! yy - call assert_fails(':put', 'E21') - call assert_fails(':put!', 'E21') - call assert_fails(':normal! p', 'E21') - call assert_fails(':normal! gp', 'E21') - call assert_fails(':normal! P', 'E21') - call assert_fails(':normal! gP', 'E21') + call assert_fails(':put', 'E21:') + call assert_fails(':put!', 'E21:') + call assert_fails(':normal! p', 'E21:') + call assert_fails(':normal! gp', 'E21:') + call assert_fails(':normal! P', 'E21:') + call assert_fails(':normal! gP', 'E21:') if has('mouse') set mouse=n - call assert_fails('execute "normal! \<MiddleMouse>"', 'E21') + call assert_fails('execute "normal! \<MiddleMouse>"', 'E21:') set mouse& endif diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim index 1faf02dc29..2fbbd143e2 100644 --- a/src/testdir/test_quickfix.vim +++ b/src/testdir/test_quickfix.vim @@ -359,7 +359,7 @@ func XfileTests(cchar) \ l[1].lnum == 800 && l[1].col == 15 && l[1].text ==# 'Line 800') " Test with a non existent file - call assert_fails('Xfile non_existent_file', 'E40') + call assert_fails('Xfile non_existent_file', 'E40:') " Run cfile/lfile from a modified buffer enew! @@ -502,8 +502,8 @@ func Xtest_browse(cchar) Xfirst call assert_fails('-5Xcc', 'E16:') - call assert_fails('Xprev', 'E553') - call asser |