To: vim_dev@googlegroups.com Subject: Patch 8.2.1593 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1593 Summary: tests do not check the error number properly Problem: Tests do not check the error number properly.0 Solution: Add a colon after the error number. (closes #6869) Files: src/testdir/test_assert.vim, src/testdir/test_autocmd.vim, src/testdir/test_backspace_opt.vim, src/testdir/test_channel.vim, src/testdir/test_clientserver.vim, src/testdir/test_cmdline.vim, src/testdir/test_const.vim, src/testdir/test_cscope.vim, src/testdir/test_eval_stuff.vim, src/testdir/test_functions.vim, src/testdir/test_global.vim, src/testdir/test_gui.vim, src/testdir/test_hlsearch.vim, src/testdir/test_lambda.vim, src/testdir/test_let.vim, src/testdir/test_listdict.vim, src/testdir/test_move.vim, src/testdir/test_normal.vim, src/testdir/test_popupwin.vim, src/testdir/test_put.vim, src/testdir/test_quickfix.vim, src/testdir/test_rename.vim, src/testdir/test_search.vim, src/testdir/test_signs.vim, src/testdir/test_substitute.vim, src/testdir/test_syntax.vim, src/testdir/test_tagfunc.vim, src/testdir/test_tagjump.vim, src/testdir/test_taglist.vim, src/testdir/test_terminal.vim, src/testdir/test_terminal2.vim, src/testdir/test_textprop.vim, src/testdir/test_timers.vim, src/testdir/test_true_false.vim, src/testdir/test_user_func.vim, src/testdir/test_vim9_func.vim, src/testdir/test_vim9_script.vim, src/testdir/test_vimscript.vim, src/testdir/test_winbar.vim, src/testdir/test_winbuf_close.vim, src/testdir/test_window_cmd.vim, src/testdir/test_writefile.vim *** ../vim-8.2.1592/src/testdir/test_assert.vim 2020-08-12 18:50:31.871655841 +0200 --- src/testdir/test_assert.vim 2020-09-04 21:11:04.861226100 +0200 *************** *** 341,348 **** 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') endfunc func Test_mouse_position() --- 341,348 ---- 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:') endfunc func Test_mouse_position() *** ../vim-8.2.1592/src/testdir/test_autocmd.vim 2020-08-20 18:29:06.800094041 +0200 --- src/testdir/test_autocmd.vim 2020-09-04 21:11:04.861226100 +0200 *************** *** 468,474 **** 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) set swapfile for file in ['Session.vim', 'Xvimrc', 'Xerrors'] --- 468,474 ---- 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) set swapfile for file in ['Session.vim', 'Xvimrc', 'Xerrors'] *************** *** 638,644 **** " 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") " should trigger, use correct option name call setbufvar(bnum, '&backup', 1) call assert_equal([], g:options) --- 638,644 ---- " 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:') " should trigger, use correct option name call setbufvar(bnum, '&backup', 1) call assert_equal([], g:options) *************** *** 1175,1189 **** au OptionSet diff close call setline(1, ['buffer 1', 'line2', 'line3', 'line4']) ! 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_equal(1, &diff) set diffopt-=closeoff bw! ! call assert_fails(':diffoff!', 'E788') bw! " Cleanup --- 1175,1189 ---- au OptionSet diff close call setline(1, ['buffer 1', 'line2', 'line3', 'line4']) ! 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_equal(1, &diff) set diffopt-=closeoff bw! ! call assert_fails(':diffoff!', 'E788:') bw! " Cleanup *************** *** 1410,1422 **** bdel Xtest e Xxx1 " write it, will unload it and give an error msg ! 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_equal('Xxx1', bufname('%')) au! BufWritePre call delete('Xxx1') --- 1410,1422 ---- bdel Xtest e Xxx1 " write it, will unload it and give an error msg ! 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_equal('Xxx1', bufname('%')) au! BufWritePre call delete('Xxx1') *************** *** 1491,1497 **** 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_equal('write', getline(4)) " now we have: --- 1491,1497 ---- 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_equal('write', getline(4)) " now we have: *************** *** 1517,1523 **** 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_equal("end of Xxx", getline(9)) " now we have: --- 1517,1523 ---- 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_equal("end of Xxx", getline(9)) " now we have: *************** *** 1535,1541 **** 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_equal(9, line('$')) call assert_equal('end of Xxx', getline('$')) --- 1535,1541 ---- 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_equal(9, line('$')) call assert_equal('end of Xxx', getline('$')) *************** *** 1776,1782 **** CheckFeature quickfix " Nasty autocommand: wipe buffer on any event. au * x bwipe ! call assert_fails('lv½ /x', 'E937') au! endfunc --- 1776,1782 ---- CheckFeature quickfix " Nasty autocommand: wipe buffer on any event. au * x bwipe ! call assert_fails('lv½ /x', 'E937:') au! endfunc *** ../vim-8.2.1592/src/testdir/test_backspace_opt.vim 2020-05-31 22:06:48.085779425 +0200 --- src/testdir/test_backspace_opt.vim 2020-09-04 21:11:04.861226100 +0200 *************** *** 41,50 **** 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')) " NOTE: Vim doesn't check following error... ! "call assert_equal(0, match(Exec('set backspace-=ghi'), '.*E474')) " Check backwards compatibility with version 5.4 and earlier set backspace=0 --- 41,50 ---- 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:')) " NOTE: Vim doesn't check following error... ! "call assert_equal(0, match(Exec('set backspace-=ghi'), '.*E474:')) " Check backwards compatibility with version 5.4 and earlier set backspace=0 *************** *** 55,62 **** 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')) " Cleared when 'compatible' is set set compatible --- 55,62 ---- 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:')) " Cleared when 'compatible' is set set compatible *** ../vim-8.2.1592/src/testdir/test_channel.vim 2020-08-12 18:50:31.871655841 +0200 --- src/testdir/test_channel.vim 2020-09-04 21:11:04.865226091 +0200 *************** *** 163,173 **** 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 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_equal(0, ch_setoptions(handle, test_null_dict())) call assert_equal(0, ch_setoptions(test_null_channel(), {'drop' : 'never'})) --- 163,173 ---- 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 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_equal(0, ch_setoptions(handle, test_null_dict())) call assert_equal(0, ch_setoptions(test_null_channel(), {'drop' : 'never'})) *** ../vim-8.2.1592/src/testdir/test_clientserver.vim 2020-08-12 18:50:31.875655822 +0200 --- src/testdir/test_clientserver.vim 2020-09-04 21:11:04.865226091 +0200 *************** *** 70,76 **** call WaitForAssert({-> assert_equal('maybe', remote_expr(name, "testvar", "", 2))}) endif ! call assert_fails('call remote_send("XXX", ":let testvar = ''yes''\")', 'E241') " Expression evaluated locally. if v:servername == '' --- 70,76 ---- call WaitForAssert({-> assert_equal('maybe', remote_expr(name, "testvar", "", 2))}) endif ! call assert_fails('call remote_send("XXX", ":let testvar = ''yes''\")', 'E241:') " Expression evaluated locally. if v:servername == '' *** ../vim-8.2.1592/src/testdir/test_cmdline.vim 2020-09-03 16:49:49.721754552 +0200 --- src/testdir/test_cmdline.vim 2020-09-04 21:11:04.865226091 +0200 *************** *** 843,849 **** f %< call assert_equal('foo-B', expand('%')) new ! call assert_fails('f #<', 'E95') bw! f foo-B.txt f %<-A --- 843,849 ---- f %< call assert_equal('foo-B', expand('%')) new ! call assert_fails('f #<', 'E95:') bw! f foo-B.txt f %<-A *** ../vim-8.2.1592/src/testdir/test_const.vim 2020-08-17 21:07:17.941045702 +0200 --- src/testdir/test_const.vim 2020-09-04 21:11:04.865226091 +0200 *************** *** 207,215 **** func Test_lockvar() let x = 'hello' lockvar x ! call assert_fails('let x = "there"', 'E741') if 0 | unlockvar x | endif ! call assert_fails('let x = "there"', 'E741') unlockvar x let x = 'there' --- 207,215 ---- func Test_lockvar() let x = 'hello' lockvar x ! call assert_fails('let x = "there"', 'E741:') if 0 | unlockvar x | endif ! call assert_fails('let x = "there"', 'E741:') unlockvar x let x = 'there' *** ../vim-8.2.1592/src/testdir/test_cscope.vim 2020-07-11 22:14:54.310422225 +0200 --- src/testdir/test_cscope.vim 2020-09-04 21:11:04.865226091 +0200 *************** *** 31,39 **** 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') if has('unix') call assert_fails('cscope add /dev/null', 'E564:') endif --- 31,39 ---- 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:') if has('unix') call assert_fails('cscope add /dev/null', 'E564:') endif *** ../vim-8.2.1592/src/testdir/test_eval_stuff.vim 2020-08-25 22:37:44.574877893 +0200 --- src/testdir/test_eval_stuff.vim 2020-09-04 21:11:04.865226091 +0200 *************** *** 35,46 **** endtry " 'p' doesn't suppress real errors call writefile([], 'Xfile') ! 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') endfunc func Test_line_continuation() --- 35,46 ---- endtry " 'p' doesn't suppress real errors call writefile([], 'Xfile') ! 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:') endfunc func Test_line_continuation() *** ../vim-8.2.1592/src/testdir/test_functions.vim 2020-09-04 18:38:02.719910414 +0200 --- src/testdir/test_functions.vim 2020-09-04 21:11:04.865226091 +0200 *************** *** 2025,2031 **** exe "lang collate" collate " 5) Errors ! 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})') --- 2025,2031 ---- exe "lang collate" collate " 5) Errors ! 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})') *** ../vim-8.2.1592/src/testdir/test_global.vim 2020-08-12 18:50:31.879655802 +0200 --- src/testdir/test_global.vim 2020-09-04 21:11:04.865226091 +0200 *************** *** 29,35 **** func Test_nested_global() new call setline(1, ['nothing', 'found', 'found bad', 'bad']) ! 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! --- 29,35 ---- func Test_nested_global() new call setline(1, ['nothing', 'found', 'found bad', 'bad']) ! 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! *** ../vim-8.2.1592/src/testdir/test_gui.vim 2020-08-12 18:50:31.879655802 +0200 --- src/testdir/test_gui.vim 2020-09-04 21:11:04.865226091 +0200 *************** *** 525,531 **** set guifontset=-*-notexist-* call assert_report("'set guifontset=-*-notexist-*' should have failed") catch ! call assert_exception('E598') endtry " Set it to an invalid value brutally for preparation. let &guifontset = '-*-notexist-*' --- 525,531 ---- set guifontset=-*-notexist-* call assert_report("'set guifontset=-*-notexist-*' should have failed") catch ! call assert_exception('E598:') endtry " Set it to an invalid value brutally for preparation. let &guifontset = '-*-notexist-*' *** ../vim-8.2.1592/src/testdir/test_hlsearch.vim 2020-08-12 18:50:31.879655802 +0200 --- src/testdir/test_hlsearch.vim 2020-09-04 21:11:04.865226091 +0200 *************** *** 28,34 **** set nohls exe "normal! /\" | redraw call assert_notequal(r1, screenattr(1,1)) ! call assert_fails('let v:hlsearch=[]', 'E745') call garbagecollect(1) call getchar(1) enew! --- 28,34 ---- set nohls exe "normal! /\" | redraw call assert_notequal(r1, screenattr(1,1)) ! call assert_fails('let v:hlsearch=[]', 'E745:') call garbagecollect(1) call getchar(1) enew! *** ../vim-8.2.1592/src/testdir/test_lambda.vim 2020-08-12 18:50:31.879655802 +0200 --- src/testdir/test_lambda.vim 2020-09-04 21:11:04.865226091 +0200 *************** *** 308,314 **** func Test_lambda_error() " This was causing a crash ! call assert_fails('ec{@{->{d->()()', 'E15') endfunc func Test_closure_error() --- 308,314 ---- func Test_lambda_error() " This was causing a crash ! call assert_fails('ec{@{->{d->()()', 'E15:') endfunc func Test_closure_error() *** ../vim-8.2.1592/src/testdir/test_let.vim 2020-07-27 21:43:24.137946109 +0200 --- src/testdir/test_let.vim 2020-09-04 21:11:04.865226091 +0200 *************** *** 250,272 **** let &t_k1 = old_t_k1 endif ! 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') endfunc func Test_let_option_error() let _w = &tw let &tw = 80 ! 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_equal("vert:|", &fillchars) let &fillchars = _w endfunc --- 250,272 ---- let &t_k1 = old_t_k1 endif ! 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:') endfunc func Test_let_option_error() let _w = &tw let &tw = 80 ! 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_equal("vert:|", &fillchars) let &fillchars = _w endfunc *** ../vim-8.2.1592/src/testdir/test_listdict.vim 2020-07-30 22:14:29.576329749 +0200 --- src/testdir/test_listdict.vim 2020-09-04 21:11:04.865226091 +0200 *************** *** 67,73 **** " 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') let l = [0, 1, 2, 3] unlet l[2:2] call assert_equal([0, 1, 3], l) --- 67,73 ---- " 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:') let l = [0, 1, 2, 3] unlet l[2:2] call assert_equal([0, 1, 3], l) *************** *** 81,87 **** unlet l[2:5] call assert_equal([0, 1], l) let l = [0, 1, 2, 3] ! 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) --- 81,87 ---- unlet l[2:5] call assert_equal([0, 1], l) let l = [0, 1, 2, 3] ! 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,111 **** 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') endfunc " test for range assign --- 104,111 ---- 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:') endfunc " test for range assign *************** *** 186,192 **** 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_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) --- 186,192 ---- 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_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,349 **** let l = [4, d, 6] let d[3] = l let dc = deepcopy(d) ! call assert_fails('call deepcopy(d, 1)', 'E698') let l2 = [0, l, l, 3] let l[1] = l2 let l3 = deepcopy(l2) --- 343,349 ---- let l = [4, d, 6] let d[3] = l let dc = deepcopy(d) ! call assert_fails('call deepcopy(d, 1)', 'E698:') let l2 = [0, l, l, 3] let l[1] = l2 let l3 = deepcopy(l2) *************** *** 522,528 **** unlet! d let d = {'a': 99, 'b': 100} lockvar 1 d ! call assert_fails('unlet d.a', 'E741') endfunc " unlet after lock on dict item --- 522,528 ---- unlet! d let d = {'a': 99, 'b': 100} lockvar 1 d ! call assert_fails('unlet d.a', 'E741:') endfunc " unlet after lock on dict item *************** *** 557,563 **** unlet! d let d = {'a': 99, 'b': 100} lockvar d.a ! call assert_fails("call extend(d, {'a' : 123})", 'E741') call assert_equal({'a': 99, 'b': 100}, d) endfunc --- 557,563 ---- unlet! d let d = {'a': 99, 'b': 100} lockvar d.a ! call assert_fails("call extend(d, {'a' : 123})", 'E741:') call assert_equal({'a': 99, 'b': 100}, d) endfunc *************** *** 572,578 **** " 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') endfunc func Test_dict_scope_var_remove() call Tfunc1('testval') --- 572,578 ---- " 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:') endfunc func Test_dict_scope_var_remove() call Tfunc1('testval') *************** *** 580,590 **** " 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') endfunc func Tfunc2(this_is_a_long_parameter_name) ! 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') --- 580,590 ---- " 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:') endfunc func Tfunc2(this_is_a_long_parameter_name) ! 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,868 **** let cmd = s:gen_cmd('let x:foo = 1', a:x) if a:fixed ! call assert_fails(cmd, 'E461') else exe cmd exe s:gen_cmd('call assert_equal(1, x:foo)', a:x) --- 862,868 ---- let cmd = s:gen_cmd('let x:foo = 1', a:x) if a:fixed ! call assert_fails(cmd, 'E461:') else exe cmd exe s:gen_cmd('call assert_equal(1, x:foo)', a:x) *************** *** 870,876 **** let cmd = s:gen_cmd('let x:["bar"] = 2', a:x) if a:fixed ! call assert_fails(cmd, 'E461') else exe cmd exe s:gen_cmd('call assert_equal(2, x:bar)', a:x) --- 870,876 ---- let cmd = s:gen_cmd('let x:["bar"] = 2', a:x) if a:fixed ! call assert_fails(cmd, 'E461:') else exe cmd exe s:gen_cmd('call assert_equal(2, x:bar)', a:x) *************** *** 878,884 **** let cmd = s:gen_cmd('call extend(x:, {"baz": 3})', a:x) if a:fixed ! call assert_fails(cmd, 'E742') else exe cmd exe s:gen_cmd('call assert_equal(3, x:baz)', a:x) --- 878,884 ---- let cmd = s:gen_cmd('call extend(x:, {"baz": 3})', a:x) if a:fixed ! call assert_fails(cmd, 'E742:') else exe cmd exe s:gen_cmd('call assert_equal(3, x:baz)', a:x) *************** *** 886,896 **** if a:fixed if a:x ==# 'a' ! 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') endif else exe s:gen_cmd('unlet x:foo', a:x) --- 886,896 ---- if a:fixed if a:x ==# 'a' ! 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:') endif else exe s:gen_cmd('unlet x:foo', a:x) *** ../vim-8.2.1592/src/testdir/test_move.vim 2020-02-17 21:33:26.270098788 +0100 --- src/testdir/test_move.vim 2020-09-04 21:11:04.865226091 +0200 *************** *** 33,40 **** call assert_true(&modified) set nomodified ! 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:') --- 33,40 ---- call assert_true(&modified) set nomodified ! 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:') *** ../vim-8.2.1592/src/testdir/test_normal.vim 2020-07-21 19:44:44.042389584 +0200 --- src/testdir/test_normal.vim 2020-09-04 21:11:04.865226091 +0200 *************** *** 1265,1272 **** " 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! \"', 'E23') call assert_fails("normal i\#", 'E23:') " Test for the expected behavior when switching between two named buffers. --- 1265,1272 ---- " 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! \"', 'E23:') call assert_fails("normal i\#", 'E23:') " Test for the expected behavior when switching between two named buffers. *************** *** 1942,1949 **** " 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') let &ul=&ul call append('$', ['a', 'b', 'c', 'd']) let &ul=&ul --- 1942,1949 ---- " 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:') let &ul=&ul call append('$', ['a', 'b', 'c', 'd']) let &ul=&ul *************** *** 2466,2475 **** " 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_equal([], getreg('~', 1, 1)) " the ~ register is read only ! call assert_fails(':let @~="1"', 'E354') bw! endfunc --- 2466,2475 ---- " 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_equal([], getreg('~', 1, 1)) " the ~ register is read only ! call assert_fails(':let @~="1"', 'E354:') bw! endfunc *************** *** 2510,2516 **** new exe "norm! \c" call assert_equal(1, winnr('$')) ! call assert_fails(":norm! \c", "E444") endfunc func Test_normal49_counts() --- 2510,2516 ---- new exe "norm! \c" call assert_equal(1, winnr('$')) ! call assert_fails(":norm! \c", 'E444:') endfunc func Test_normal49_counts() *************** *** 2531,2537 **** "call feedkeys("\", 'tm') " should also fail with E11 ! call assert_fails(":wincmd p", 'E11') " return from commandline window call feedkeys("\") endfunc --- 2531,2537 ---- "call feedkeys("\", 'tm') " should also fail with E11 ! call assert_fails(":wincmd p", 'E11:') " return from commandline window call feedkeys("\") endfunc *************** *** 2560,2566 **** new Xreadonly.log setl ro au FileChangedRO :call feedkeys("\", 'tix') ! call assert_fails(":norm! Af", 'E788') call assert_equal(['foo'], getline(1,'$')) call assert_equal('Xreadonly.log', bufname('')) --- 2560,2566 ---- new Xreadonly.log setl ro au FileChangedRO :call feedkeys("\", 'tix') ! call assert_fails(":norm! Af", 'E788:') call assert_equal(['foo'], getline(1,'$')) call assert_equal('Xreadonly.log', bufname('')) *************** *** 2701,2707 **** func Test_nv_hat_count() %bwipeout! let l:nr = bufnr('%') + 1 ! call assert_fails(':execute "normal! ' . l:nr . '\"', 'E92') edit Xfoo let l:foo_nr = bufnr('Xfoo') --- 2701,2707 ---- func Test_nv_hat_count() %bwipeout! let l:nr = bufnr('%') + 1 ! call assert_fails(':execute "normal! ' . l:nr . '\"', 'E92:') edit Xfoo let l:foo_nr = bufnr('Xfoo') *** ../vim-8.2.1592/src/testdir/test_popupwin.vim 2020-09-03 18:52:20.223638410 +0200 --- src/testdir/test_popupwin.vim 2020-09-04 21:11:04.865226091 +0200 *************** *** 976,986 **** func Test_win_execute_closing_curwin() split let winid = popup_create('some text', {}) ! 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! :\call popup_close(%d)\", winid))', 'E994') call popup_clear() endfunc --- 976,986 ---- func Test_win_execute_closing_curwin() split let winid = popup_create('some text', {}) ! 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! :\call popup_close(%d)\", winid))', 'E994:') call popup_clear() endfunc *** ../vim-8.2.1592/src/testdir/test_put.vim 2020-08-30 19:26:40.740556812 +0200 --- src/testdir/test_put.vim 2020-09-04 21:11:04.865226091 +0200 *************** *** 60,75 **** 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') if has('mouse') set mouse=n ! call assert_fails('execute "normal! \"', 'E21') set mouse& endif --- 60,75 ---- 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:') if has('mouse') set mouse=n ! call assert_fails('execute "normal! \"', 'E21:') set mouse& endif *** ../vim-8.2.1592/src/testdir/test_quickfix.vim 2020-09-04 18:38:02.719910414 +0200 --- src/testdir/test_quickfix.vim 2020-09-04 21:11:04.869226082 +0200 *************** *** 359,365 **** \ 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') " Run cfile/lfile from a modified buffer enew! --- 359,365 ---- \ 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:') " Run cfile/lfile from a modified buffer enew! *************** *** 502,509 **** Xfirst call assert_fails('-5Xcc', 'E16:') ! call assert_fails('Xprev', 'E553') ! call assert_fails('Xpfile', 'E553') Xnfile call assert_equal('Xqftestfile2', @%) call assert_equal(10, line('.')) --- 502,509 ---- Xfirst call assert_fails('-5Xcc', 'E16:') ! call assert_fails('Xprev', 'E553:') ! call assert_fails('Xpfile', 'E553:') Xnfile call assert_equal('Xqftestfile2', @%) call assert_equal(10, line('.')) *************** *** 526,533 **** Xprev call assert_equal('Xqftestfile2', @%) call assert_equal(11, line('.')) ! call assert_fails('Xnext', 'E553') ! call assert_fails('Xnfile', 'E553') " To process the range using quickfix list entries, directly use the " quickfix commands (don't use the user defined commands) if a:cchar == 'c' --- 526,533 ---- Xprev call assert_equal('Xqftestfile2', @%) call assert_equal(11, line('.')) ! call assert_fails('Xnext', 'E553:') ! call assert_fails('Xnfile', 'E553:') " To process the range using quickfix list entries, directly use the " quickfix commands (don't use the user defined commands) if a:cchar == 'c' *************** *** 2174,2181 **** endif " Invalid arguments ! call assert_fails('call g:Xgetlist([])', 'E715') ! call assert_fails('call g:Xsetlist([], "a", [])', 'E715') let s = g:Xsetlist([], 'a', {'abc':1}) call assert_equal(-1, s) --- 2174,2181 ---- endif " Invalid arguments ! call assert_fails('call g:Xgetlist([])', 'E715:') ! call assert_fails('call g:Xsetlist([], "a", [])', 'E715:') let s = g:Xsetlist([], 'a', {'abc':1}) call assert_equal(-1, s) *************** *** 2978,2984 **** func Test_cclose_from_copen() augroup QF_Test au! ! au FileType qf :call assert_fails(':cclose', 'E788') augroup END copen augroup QF_Test --- 2978,2984 ---- func Test_cclose_from_copen() augroup QF_Test au! ! au FileType qf :call assert_fails(':cclose', 'E788:') augroup END copen augroup QF_Test *************** *** 2993,2999 **** call test_override('starting', 1) augroup QF_Test au! ! au FileType qf :call assert_fails(':cclose', 'E788') augroup END copen augroup QF_Test --- 2993,2999 ---- call test_override('starting', 1) augroup QF_Test au! ! au FileType qf :call assert_fails(':cclose', 'E788:') augroup END copen augroup QF_Test *************** *** 3021,3027 **** " Fails with argument. augroup QF_Test au! ! au FileType qf call assert_fails(':file foo', 'E788') augroup END copen augroup QF_Test --- 3021,3027 ---- " Fails with argument. augroup QF_Test au! ! au FileType qf call assert_fails(':file foo', 'E788:') augroup END copen augroup QF_Test *************** *** 3702,3708 **** func Test_lfile_crash() sp Xtest au QuickFixCmdPre * bw ! call assert_fails('lfile', 'E40') au! QuickFixCmdPre endfunc --- 3702,3708 ---- func Test_lfile_crash() sp Xtest au QuickFixCmdPre * bw ! call assert_fails('lfile', 'E40:') au! QuickFixCmdPre endfunc *************** *** 4235,4241 **** call g:Xsetlist([]) Xopen let l:win_count = winnr('$') ! call assert_fails('execute "normal! \\"', 'E42') call assert_equal(l:win_count, winnr('$')) Xclose endfunc --- 4235,4241 ---- call g:Xsetlist([]) Xopen let l:win_count = winnr('$') ! call assert_fails('execute "normal! \\"', 'E42:') call assert_equal(l:win_count, winnr('$')) Xclose endfunc *** ../vim-8.2.1592/src/testdir/test_rename.vim 2020-08-12 18:50:31.883655785 +0200 --- src/testdir/test_rename.vim 2020-09-04 21:11:04.869226082 +0200 *************** *** 113,120 **** " Can't rename to en empty file name. call assert_notequal(0, rename('Xrenamefile', '')) ! call assert_fails('call rename("Xrenamefile", [])', 'E730') ! call assert_fails('call rename(0z, "Xrenamefile")', 'E976') call delete('Xrenamefile') endfunc --- 113,120 ---- " Can't rename to en empty file name. call assert_notequal(0, rename('Xrenamefile', '')) ! call assert_fails('call rename("Xrenamefile", [])', 'E730:') ! call assert_fails('call rename(0z, "Xrenamefile")', 'E976:') call delete('Xrenamefile') endfunc *** ../vim-8.2.1592/src/testdir/test_search.vim 2020-07-26 13:27:12.417186380 +0200 --- src/testdir/test_search.vim 2020-09-04 21:11:04.869226082 +0200 *************** *** 266,272 **** " In that case Vim should return "E35 no previous regular expression", " but it looks like Vim still sees /foo and therefore the test fails. " Therefore, disabling this test ! "call assert_fails(feedkeys("/foo\\", 'tx'), 'E35') "call assert_equal({'lnum': 1, 'leftcol': 0, 'col': 0, 'topfill': 0, 'topline': 1, 'coladd': 0, 'skipcol': 0, 'curswant': 0}, winsaveview()) " clean up --- 266,272 ---- " In that case Vim should return "E35 no previous regular expression", " but it looks like Vim still sees /foo and therefore the test fails. " Therefore, disabling this test ! "call assert_fails(feedkeys("/foo\\", 'tx'), 'E35:') "call assert_equal({'lnum': 1, 'leftcol': 0, 'col': 0, 'topfill': 0, 'topline': 1, 'coladd': 0, 'skipcol': 0, 'curswant': 0}, winsaveview()) " clean up *************** *** 470,476 **** call feedkeys(":%smagic/the.e/xxx\", 'tx') call assert_equal(' 2 xxx', getline('.')) undo ! call assert_fails(":%snomagic/the.e/xxx\", 'E486') " call feedkeys(":%snomagic/the\\.e/xxx\", 'tx') call assert_equal(' 2 xxx', getline('.')) --- 470,476 ---- call feedkeys(":%smagic/the.e/xxx\", 'tx') call assert_equal(' 2 xxx', getline('.')) undo ! call assert_fails(":%snomagic/the.e/xxx\", 'E486:') " call feedkeys(":%snomagic/the\\.e/xxx\", 'tx') call assert_equal(' 2 xxx', getline('.')) *************** *** 1278,1285 **** func Test_search_sentence() new " this used to cause a crash ! call assert_fails("/\\%')", 'E486') ! call assert_fails("/", 'E486') /\%'( / endfunc --- 1278,1285 ---- func Test_search_sentence() new " this used to cause a crash ! call assert_fails("/\\%')", 'E486:') ! call assert_fails("/", 'E486:') /\%'( / endfunc *** ../vim-8.2.1592/src/testdir/test_signs.vim 2020-08-31 21:58:36.115898718 +0200 --- src/testdir/test_signs.vim 2020-09-04 21:11:04.869226082 +0200 *************** *** 1994,2000 **** call assert_fails('call sign_unplacelist([[]])', "E715:") call assert_fails('call sign_unplacelist(["abc"])', "E715:") call assert_fails('call sign_unplacelist([100])', "E715:") ! call assert_fails("call sign_unplacelist([{'id' : -1}])", 'E474') call assert_equal([0, 0, 0, 0], \ sign_undefine(['sign1', 'sign2', 'sign3', 'sign4'])) --- 1994,2000 ---- call assert_fails('call sign_unplacelist([[]])', "E715:") call assert_fails('call sign_unplacelist(["abc"])', "E715:") call assert_fails('call sign_unplacelist([100])', "E715:") ! call assert_fails("call sign_unplacelist([{'id' : -1}])", 'E474:') call assert_equal([0, 0, 0, 0], \ sign_undefine(['sign1', 'sign2', 'sign3', 'sign4'])) *** ../vim-8.2.1592/src/testdir/test_substitute.vim 2020-07-11 22:14:54.318422203 +0200 --- src/testdir/test_substitute.vim 2020-09-04 21:11:04.869226082 +0200 *************** *** 449,455 **** " 20 arguments plus one is too many let Replacer = function('SubReplacer20', repeat(['foo'], 20)) ! call assert_fails("call substitute('123', '2', Replacer, 'g')", 'E118') endfunc " Tests for *sub-replace-special* and *sub-replace-expression* on :substitute. --- 449,455 ---- " 20 arguments plus one is too many let Replacer = function('SubReplacer20', repeat(['foo'], 20)) ! call assert_fails("call substitute('123', '2', Replacer, 'g')", 'E118:') endfunc " Tests for *sub-replace-special* and *sub-replace-expression* on :substitute. *************** *** 632,638 **** call Run_SubCmd_Tests(tests) exe "normal oQ\nQ\k" ! call assert_fails('s/Q[^\n]Q/\=submatch(0)."foobar"/', 'E486') enew! endfunc --- 632,638 ---- call Run_SubCmd_Tests(tests) exe "normal oQ\nQ\k" ! call assert_fails('s/Q[^\n]Q/\=submatch(0)."foobar"/', 'E486:') enew! endfunc *** ../vim-8.2.1592/src/testdir/test_syntax.vim 2020-08-12 18:50:31.887655765 +0200 --- src/testdir/test_syntax.vim 2020-09-04 21:11:04.869226082 +0200 *************** *** 107,113 **** call assert_notmatch('.* cppNumber*', a) call assert_notmatch('[1-9]', a) ! call assert_fails('syntime abc', 'E475') syntax clear let a = execute('syntime report') --- 107,113 ---- call assert_notmatch('.* cppNumber*', a) call assert_notmatch('[1-9]', a) ! call assert_fails('syntime abc', 'E475:') syntax clear let a = execute('syntime report') *************** *** 718,725 **** syntax on set foldmethod=syntax ! call assert_fails('syn foldlevel start start', 'E390') ! call assert_fails('syn foldlevel not_an_option', 'E390') set foldlevel=1 --- 718,725 ---- syntax on set foldmethod=syntax ! call assert_fails('syn foldlevel start start', 'E390:') ! call assert_fails('syn foldlevel not_an_option', 'E390:') set foldlevel=1 *** ../vim-8.2.1592/src/testdir/test_tagfunc.vim 2020-07-11 22:14:54.322422193 +0200 --- src/testdir/test_tagfunc.vim 2020-09-04 21:11:04.869226082 +0200 *************** *** 73,79 **** return v:null endfunc set tags= tfu=NullTagFunc ! call assert_fails('tag nothing', 'E433') delf NullTagFunc bwipe! --- 73,79 ---- return v:null endfunc set tags= tfu=NullTagFunc ! call assert_fails('tag nothing', 'E433:') delf NullTagFunc bwipe! *** ../vim-8.2.1592/src/testdir/test_tagjump.vim 2020-08-12 18:50:31.887655765 +0200 --- src/testdir/test_tagjump.vim 2020-09-04 21:11:04.869226082 +0200 *************** *** 8,14 **** CheckFeature quickfix set notagstack ! call assert_fails('ptag does_not_exist_tag_name', 'E433') set tagstack&vim endfunc --- 8,14 ---- CheckFeature quickfix set notagstack ! call assert_fails('ptag does_not_exist_tag_name', 'E433:') set tagstack&vim endfunc *************** *** 365,374 **** " Error cases call assert_equal({}, gettagstack(100)) call assert_equal(-1, settagstack(100, {'items' : []})) ! call assert_fails('call settagstack(1, [1, 10])', 'E715') ! 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' : []}, 'b')", 'E962') call assert_equal(-1, settagstack(0, test_null_dict())) set tags=Xtags --- 365,374 ---- " Error cases call assert_equal({}, gettagstack(100)) call assert_equal(-1, settagstack(100, {'items' : []})) ! call assert_fails('call settagstack(1, [1, 10])', 'E715:') ! 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' : []}, 'b')", 'E962:') call assert_equal(-1, settagstack(0, test_null_dict())) set tags=Xtags *************** *** 565,571 **** let old_vbs = &verbose set verbose=5 " ":tjump" should give "tag not found" not "Format error in tags file" ! call assert_fails('tj /foo', 'E426') try tj /foo catch /^Vim\%((\a\+)\)\=:E431/ --- 565,571 ---- let old_vbs = &verbose set verbose=5 " ":tjump" should give "tag not found" not "Format error in tags file" ! call assert_fails('tj /foo', 'E426:') try tj /foo catch /^Vim\%((\a\+)\)\=:E431/ *************** *** 577,583 **** call writefile([ \ '123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567 django/contrib/admin/templates/admin/edit_inline/stacked.html 16;" j line:16 language:HTML' \ ], 'Xtags') ! call assert_fails('tj /foo', 'E426') try tj /foo catch /^Vim\%((\a\+)\)\=:E431/ --- 577,583 ---- call writefile([ \ '123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567 django/contrib/admin/templates/admin/edit_inline/stacked.html 16;" j line:16 language:HTML' \ ], 'Xtags') ! call assert_fails('tj /foo', 'E426:') try tj /foo catch /^Vim\%((\a\+)\)\=:E431/ *** ../vim-8.2.1592/src/testdir/test_taglist.vim 2020-08-12 18:50:31.887655765 +0200 --- src/testdir/test_taglist.vim 2020-09-04 21:11:04.869226082 +0200 *************** *** 83,89 **** endfunc func Test_tags_too_long() ! call assert_fails('tag ' . repeat('x', 1020), ['E433', 'E426']) tags endfunc --- 83,89 ---- endfunc func Test_tags_too_long() ! call assert_fails('tag ' . repeat('x', 1020), ['E433:', 'E426:']) tags endfunc *** ../vim-8.2.1592/src/testdir/test_terminal.vim 2020-08-20 18:59:02.106779176 +0200 --- src/testdir/test_terminal.vim 2020-09-04 21:11:04.869226082 +0200 *************** *** 65,71 **** setlocal modifiable exe "normal Axxx\" ! call assert_fails(buf . 'bwipe', ['E89:', 'E517']) undo exe buf . 'bwipe' --- 65,71 ---- setlocal modifiable exe "normal Axxx\" ! call assert_fails(buf . 'bwipe', ['E89:', 'E517:']) undo exe buf . 'bwipe' *************** *** 89,95 **** func Test_terminal_wipe_buffer() let buf = Run_shell_in_terminal({}) ! call assert_fails(buf . 'bwipe', ['E89', 'E517']) exe buf . 'bwipe!' call WaitForAssert({-> assert_equal('dead', job_status(g:job))}) call assert_equal("", bufname(buf)) --- 89,95 ---- func Test_terminal_wipe_buffer() let buf = Run_shell_in_terminal({}) ! call assert_fails(buf . 'bwipe', ['E89:', 'E517:']) exe buf . 'bwipe!' call WaitForAssert({-> assert_equal('dead', job_status(g:job))}) call assert_equal("", bufname(buf)) *************** *** 648,654 **** func Test_terminal_list_args() let buf = term_start([&shell, &shellcmdflag, 'echo "123"']) ! call assert_fails(buf . 'bwipe', ['E89', 'E517']) exe buf . 'bwipe!' call assert_equal("", bufname(buf)) endfunction --- 648,654 ---- func Test_terminal_list_args() let buf = term_start([&shell, &shellcmdflag, 'echo "123"']) ! call assert_fails(buf . 'bwipe', ['E89:', 'E517:']) exe buf . 'bwipe!' call assert_equal("", bufname(buf)) endfunction *************** *** 892,898 **** func Test_terminal_wqall() let buf = Run_shell_in_terminal({}) ! call assert_fails('wqall', 'E948') call StopShellInTerminal(buf) call TermWait(buf) exe buf . 'bwipe' --- 892,898 ---- func Test_terminal_wqall() let buf = Run_shell_in_terminal({}) ! call assert_fails('wqall', 'E948:') call StopShellInTerminal(buf) call TermWait(buf) exe buf . 'bwipe' *************** *** 993,1009 **** func Test_terminal_term_start_empty_command() let cmd = "call term_start('', {'curwin' : 1, 'term_finish' : 'close'})" ! call assert_fails(cmd, 'E474') let cmd = "call term_start('', {'curwin' : 1, 'term_finish' : 'close'})" ! call assert_fails(cmd, 'E474') let cmd = "call term_start({}, {'curwin' : 1, 'term_finish' : 'close'})" ! call assert_fails(cmd, 'E474') let cmd = "call term_start(0, {'curwin' : 1, 'term_finish' : 'close'})" ! call assert_fails(cmd, 'E474') let cmd = "call term_start('', {'term_name' : []})" ! call assert_fails(cmd, 'E730') let cmd = "call term_start('', {'term_finish' : 'axby'})" ! call assert_fails(cmd, 'E475') let cmd = "call term_start('', {'eof_chars' : []})" call assert_fails(cmd, 'E730:') let cmd = "call term_start('', {'term_kill' : []})" --- 993,1009 ---- func Test_terminal_term_start_empty_command() let cmd = "call term_start('', {'curwin' : 1, 'term_finish' : 'close'})" ! call assert_fails(cmd, 'E474:') let cmd = "call term_start('', {'curwin' : 1, 'term_finish' : 'close'})" ! call assert_fails(cmd, 'E474:') let cmd = "call term_start({}, {'curwin' : 1, 'term_finish' : 'close'})" ! call assert_fails(cmd, 'E474:') let cmd = "call term_start(0, {'curwin' : 1, 'term_finish' : 'close'})" ! call assert_fails(cmd, 'E474:') let cmd = "call term_start('', {'term_name' : []})" ! call assert_fails(cmd, 'E730:') let cmd = "call term_start('', {'term_finish' : 'axby'})" ! call assert_fails(cmd, 'E475:') let cmd = "call term_start('', {'eof_chars' : []})" call assert_fails(cmd, 'E730:') let cmd = "call term_start('', {'term_kill' : []})" *** ../vim-8.2.1592/src/testdir/test_terminal2.vim 2020-09-04 18:34:06.116621660 +0200 --- src/testdir/test_terminal2.vim 2020-09-04 21:11:04.869226082 +0200 *************** *** 36,44 **** call StopVimInTerminal(buf) call delete('Xwinsize') ! call assert_fails('set termwinsize=40', 'E474') ! call assert_fails('set termwinsize=10+40', 'E474') ! call assert_fails('set termwinsize=abc', 'E474') set termwinsize= endfunc --- 36,44 ---- call StopVimInTerminal(buf) call delete('Xwinsize') ! call assert_fails('set termwinsize=40', 'E474:') ! call assert_fails('set termwinsize=10+40', 'E474:') ! call assert_fails('set termwinsize=abc', 'E474:') set termwinsize= endfunc *** ../vim-8.2.1592/src/testdir/test_textprop.vim 2020-09-03 22:33:40.969029618 +0200 --- src/testdir/test_textprop.vim 2020-09-04 21:11:04.869226082 +0200 *************** *** 314,321 **** unlet props[3] call assert_equal(props, prop_list(1)) ! call assert_fails("call prop_remove({'id': 11, 'both': 1})", 'E860') ! call assert_fails("call prop_remove({'type': 'three', 'both': 1})", 'E860') call DeletePropTypes() bwipe! --- 314,321 ---- unlet props[3] call assert_equal(props, prop_list(1)) ! call assert_fails("call prop_remove({'id': 11, 'both': 1})", 'E860:') ! call assert_fails("call prop_remove({'type': 'three', 'both': 1})", 'E860:') call DeletePropTypes() bwipe! *** ../vim-8.2.1592/src/testdir/test_timers.vim 2020-06-05 21:06:06.607601386 +0200 --- src/testdir/test_timers.vim 2020-09-04 21:11:04.869226082 +0200 *************** *** 422,428 **** endfunc func Test_timer_invalid_callback() ! call assert_fails('call timer_start(0, "0")', 'E921') endfunc func Test_timer_changing_function_list() --- 422,428 ---- endfunc func Test_timer_invalid_callback() ! call assert_fails('call timer_start(0, "0")', 'E921:') endfunc func Test_timer_changing_function_list() *************** *** 442,448 **** call term_sendkeys(buf, ":fu\") call WaitForAssert({-> assert_match('-- More --', term_getline(buf, 10))}) call term_sendkeys(buf, "G") ! call WaitForAssert({-> assert_match('E454', term_getline(buf, 9))}) call term_sendkeys(buf, "\") call StopVimInTerminal(buf) --- 442,448 ---- call term_sendkeys(buf, ":fu\") call WaitForAssert({-> assert_match('-- More --', term_getline(buf, 10))}) call term_sendkeys(buf, "G") ! call WaitForAssert({-> assert_match('E454:', term_getline(buf, 9))}) call term_sendkeys(buf, "\") call StopVimInTerminal(buf) *** ../vim-8.2.1592/src/testdir/test_true_false.vim 2020-08-12 18:50:31.887655765 +0200 --- src/testdir/test_true_false.vim 2020-09-04 21:11:04.869226082 +0200 *************** *** 40,50 **** call assert_true(false, 'one in string is true') endif ! call assert_fails('if [1]', 'E745') ! call assert_fails('if {1: 1}', 'E728') ! call assert_fails('if function("string")', 'E703') if has('float') ! call assert_fails('if 1.3")', 'E805') endif endfunc --- 40,50 ---- call assert_true(false, 'one in string is true') endif ! call assert_fails('if [1]', 'E745:') ! call assert_fails('if {1: 1}', 'E728:') ! call assert_fails('if function("string")', 'E703:') if has('float') ! call assert_fails('if 1.3")', 'E805:') endif endfunc *** ../vim-8.2.1592/src/testdir/test_user_func.vim 2020-07-01 20:19:33.796968918 +0200 --- src/testdir/test_user_func.vim 2020-09-04 21:11:04.869226082 +0200 *************** *** 88,94 **** " Try to overwrite a function in the global (g:) scope call assert_equal(3, max([1, 2, 3])) ! call assert_fails("call extend(g:, {'max': function('min')})", 'E704') call assert_equal(3, max([1, 2, 3])) " Try to overwrite an user defined function with a function reference --- 88,94 ---- " Try to overwrite a function in the global (g:) scope call assert_equal(3, max([1, 2, 3])) ! call assert_fails("call extend(g:, {'max': function('min')})", 'E704:') call assert_equal(3, max([1, 2, 3])) " Try to overwrite an user defined function with a function reference *************** *** 131,137 **** if has('float') call assert_equal(1.0, Log(10)) call assert_equal(log(10), Log(10, exp(1))) ! call assert_fails("call Log(1,2,3)", 'E118') endif let res = Args(1) --- 131,137 ---- if has('float') call assert_equal(1.0, Log(10)) call assert_equal(log(10), Log(10, exp(1))) ! call assert_fails("call Log(1,2,3)", 'E118:') endif let res = Args(1) *************** *** 149,156 **** call assert_equal(res.optional, 2) call assert_equal(res['0'], 1) ! call assert_fails("call MakeBadFunc()", 'E989') ! call assert_fails("fu F(a=1 ,) | endf", 'E475') let d = Args2(7, v:none, 9) call assert_equal([7, 2, 9], [d.a, d.b, d.c]) --- 149,156 ---- call assert_equal(res.optional, 2) call assert_equal(res['0'], 1) ! call assert_fails("call MakeBadFunc()", 'E989:') ! call assert_fails("fu F(a=1 ,) | endf", 'E475:') let d = Args2(7, v:none, 9) call assert_equal([7, 2, 9], [d.a, d.b, d.c]) *** ../vim-8.2.1592/src/testdir/test_vim9_func.vim 2020-09-04 19:50:53.808691766 +0200 --- src/testdir/test_vim9_func.vim 2020-09-04 21:11:04.869226082 +0200 *************** *** 523,529 **** def Test_error_in_nested_function() # Error in called function requires unwinding the call stack. ! assert_fails('call FuncWithForwardCall()', 'E1096') enddef def Test_return_type_wrong() --- 523,529 ---- def Test_error_in_nested_function() # Error in called function requires unwinding the call stack. ! assert_fails('call FuncWithForwardCall()', 'E1096:') enddef def Test_return_type_wrong() *************** *** 735,742 **** CallGoneSoon() END writefile(lines, 'XToDelFunc') ! assert_fails('so XToDelFunc', 'E933') ! assert_fails('so XToDelFunc', 'E933') delete('XToDelFunc') enddef --- 735,742 ---- CallGoneSoon() END writefile(lines, 'XToDelFunc') ! assert_fails('so XToDelFunc', 'E933:') ! assert_fails('so XToDelFunc', 'E933:') delete('XToDelFunc') enddef *** ../vim-8.2.1592/src/testdir/test_vim9_script.vim 2020-08-30 12:54:49.845096749 +0200 --- src/testdir/test_vim9_script.vim 2020-09-04 21:11:04.869226082 +0200 *************** *** 1575,1582 **** CheckScriptFailure(['vim9script', 'let str: string', 'str = 1234'], 'E1012:') CheckScriptFailure(['vim9script', 'const str = "asdf"', 'str = "xxx"'], 'E46:') ! assert_fails('vim9script', 'E1038') ! assert_fails('export something', 'E1043') enddef func Test_import_fails_without_script() --- 1575,1582 ---- CheckScriptFailure(['vim9script', 'let str: string', 'str = 1234'], 'E1012:') CheckScriptFailure(['vim9script', 'const str = "asdf"', 'str = "xxx"'], 'E46:') ! assert_fails('vim9script', 'E1038:') ! assert_fails('export something', 'E1043:') enddef func Test_import_fails_without_script() *** ../vim-8.2.1592/src/testdir/test_vimscript.vim 2020-08-22 22:37:17.089141677 +0200 --- src/testdir/test_vimscript.vim 2020-09-04 21:11:04.873226074 +0200 *************** *** 95,101 **** call T1_G() catch " Catch missing :endif ! call assert_true(v:exception =~ 'E171') Xpath 'x' endtry Xpath 'G' --- 95,101 ---- call T1_G() catch " Catch missing :endif ! call assert_true(v:exception =~ 'E171:') Xpath 'x' endtry Xpath 'G' *************** *** 125,131 **** ExecAsScript T1_G catch " Catch missing :endif ! call assert_true(v:exception =~ 'E171') Xpath 'x' endtry Xpath 'G' --- 125,131 ---- ExecAsScript T1_G catch " Catch missing :endif ! call assert_true(v:exception =~ 'E171:') Xpath 'x' endtry Xpath 'G' *************** *** 7022,7029 **** call assert_equal(10.5, x) let x /= 2.5 call assert_equal(4.2, x) ! call assert_fails('let x %= 0.5', 'E734') ! call assert_fails('let x .= "f"', 'E734') let x = !3.14 call assert_equal(0.0, x) --- 7022,7029 ---- call assert_equal(10.5, x) let x /= 2.5 call assert_equal(4.2, x) ! call assert_fails('let x %= 0.5', 'E734:') ! call assert_fails('let x .= "f"', 'E734:') let x = !3.14 call assert_equal(0.0, x) *************** *** 7044,7054 **** " Test for environment variable let $FOO = 1 ! call assert_fails('let $FOO += 1', 'E734') ! call assert_fails('let $FOO -= 1', 'E734') ! call assert_fails('let $FOO *= 1', 'E734') ! call assert_fails('let $FOO /= 1', 'E734') ! call assert_fails('let $FOO %= 1', 'E734') let $FOO .= 's' call assert_equal('1s', $FOO) unlet $FOO --- 7044,7054 ---- " Test for environment variable let $FOO = 1 ! call assert_fails('let $FOO += 1', 'E734:') ! call assert_fails('let $FOO -= 1', 'E734:') ! call assert_fails('let $FOO *= 1', 'E734:') ! call assert_fails('let $FOO /= 1', 'E734:') ! call assert_fails('let $FOO %= 1', 'E734:') let $FOO .= 's' call assert_equal('1s', $FOO) unlet $FOO *************** *** 7065,7080 **** call assert_equal(6, &scrolljump) let &scrolljump %= 5 call assert_equal(1, &scrolljump) ! call assert_fails('let &scrolljump .= "j"', 'E734') set scrolljump&vim " Test for register let @/ = 1 ! call assert_fails('let @/ += 1', 'E734') ! call assert_fails('let @/ -= 1', 'E734') ! call assert_fails('let @/ *= 1', 'E734') ! call assert_fails('let @/ /= 1', 'E734') ! call assert_fails('let @/ %= 1', 'E734') let @/ .= 's' call assert_equal('1s', @/) let @/ = '' --- 7065,7080 ---- call assert_equal(6, &scrolljump) let &scrolljump %= 5 call assert_equal(1, &scrolljump) ! call assert_fails('let &scrolljump .= "j"', 'E734:') set scrolljump&vim " Test for register let @/ = 1 ! call assert_fails('let @/ += 1', 'E734:') ! call assert_fails('let @/ -= 1', 'E734:') ! call assert_fails('let @/ *= 1', 'E734:') ! call assert_fails('let @/ /= 1', 'E734:') ! call assert_fails('let @/ %= 1', 'E734:') let @/ .= 's' call assert_equal('1s', @/) let @/ = '' *************** *** 7083,7090 **** func Test_unlet_env() let $TESTVAR = 'yes' call assert_equal('yes', $TESTVAR) ! call assert_fails('lockvar $TESTVAR', 'E940') ! call assert_fails('unlockvar $TESTVAR', 'E940') call assert_equal('yes', $TESTVAR) if 0 unlet $TESTVAR --- 7083,7090 ---- func Test_unlet_env() let $TESTVAR = 'yes' call assert_equal('yes', $TESTVAR) ! call assert_fails('lockvar $TESTVAR', 'E940:') ! call assert_fails('unlockvar $TESTVAR', 'E940:') call assert_equal('yes', $TESTVAR) if 0 unlet $TESTVAR *************** *** 7339,7346 **** " Test for errors in converting to float from various types {{{1 func Test_float_conversion_errors() if has('float') ! call assert_fails('let x = 4.0 % 2.0', 'E804') ! call assert_fails('echo 1.1[0]', 'E806') call assert_fails('echo sort([function("min"), 1], "f")', 'E891:') call assert_fails('echo 3.2 == "vim"', 'E892:') call assert_fails('echo sort([[], 1], "f")', 'E893:') --- 7339,7346 ---- " Test for errors in converting to float from various types {{{1 func Test_float_conversion_errors() if has('float') ! call assert_fails('let x = 4.0 % 2.0', 'E804:') ! call assert_fails('echo 1.1[0]', 'E806:') call assert_fails('echo sort([function("min"), 1], "f")', 'E891:') call assert_fails('echo 3.2 == "vim"', 'E892:') call assert_fails('echo sort([[], 1], "f")', 'E893:') *** ../vim-8.2.1592/src/testdir/test_winbar.vim 2020-08-12 18:50:31.887655765 +0200 --- src/testdir/test_winbar.vim 2020-09-04 21:11:04.873226074 +0200 *************** *** 18,24 **** call assert_equal(12, g:did_cont) wincmd w ! call assert_fails('emenu WinBar.Next', 'E334') wincmd p aunmenu WinBar.Next --- 18,24 ---- call assert_equal(12, g:did_cont) wincmd w ! call assert_fails('emenu WinBar.Next', 'E334:') wincmd p aunmenu WinBar.Next *** ../vim-8.2.1592/src/testdir/test_winbuf_close.vim 2020-08-12 18:50:31.887655765 +0200 --- src/testdir/test_winbuf_close.vim 2020-09-04 21:11:04.873226074 +0200 *************** *** 27,33 **** " test for failing :rew when hidden not set set nohidden call setline(1, 'testtext 2 2') ! call assert_fails('rewind', 'E37') call assert_equal('Xtest2', bufname('%')) call assert_equal('testtext 2 2', getline(1)) --- 27,33 ---- " test for failing :rew when hidden not set set nohidden call setline(1, 'testtext 2 2') ! call assert_fails('rewind', 'E37:') call assert_equal('Xtest2', bufname('%')) call assert_equal('testtext 2 2', getline(1)) *************** *** 66,72 **** " test ":edit" failing in modified buffer when 'hidden' not set call setline(1, 'testtext 3 3') ! call assert_fails('edit Xtest1', 'E37') call assert_equal('Xtest3', bufname('%')) call assert_equal('testtext 3 3', getline(1)) --- 66,72 ---- " test ":edit" failing in modified buffer when 'hidden' not set call setline(1, 'testtext 3 3') ! call assert_fails('edit Xtest1', 'E37:') call assert_equal('Xtest3', bufname('%')) call assert_equal('testtext 3 3', getline(1)) *************** *** 80,86 **** split Xtest3 set nohidden call setline(1, 'testtext 3 3 3') ! call assert_fails('close', 'E37') call assert_equal('Xtest3', bufname('%')) call assert_equal('testtext 3 3 3', getline(1)) --- 80,86 ---- split Xtest3 set nohidden call setline(1, 'testtext 3 3 3') ! call assert_fails('close', 'E37:') call assert_equal('Xtest3', bufname('%')) call assert_equal('testtext 3 3 3', getline(1)) *************** *** 115,121 **** call assert_equal('Xtest2', bufname('%')) quit! call assert_equal('Xtest3', bufname('%')) ! call assert_fails('silent! quit!', 'E37') call assert_equal('Xtest1', bufname('%')) call delete('Xtest1') --- 115,121 ---- call assert_equal('Xtest2', bufname('%')) quit! call assert_equal('Xtest3', bufname('%')) ! call assert_fails('silent! quit!', 'E37:') call assert_equal('Xtest1', bufname('%')) call delete('Xtest1') *** ../vim-8.2.1592/src/testdir/test_window_cmd.vim 2020-09-04 14:41:17.621141198 +0200 --- src/testdir/test_window_cmd.vim 2020-09-04 21:11:04.873226074 +0200 *************** *** 121,127 **** " Test for failure when the alternate buffer/file no longer exists. edit Xfoo | %bw ! call assert_fails(':wincmd ^', 'E23') " Test for the expected behavior when we have two named buffers. edit Xfoo | edit Xbar --- 121,127 ---- " Test for failure when the alternate buffer/file no longer exists. edit Xfoo | %bw ! call assert_fails(':wincmd ^', 'E23:') " Test for the expected behavior when we have two named buffers. edit Xfoo | edit Xbar *************** *** 154,162 **** %bwipeout let l:nr = bufnr('%') + 1 ! call assert_fails(':execute "normal! ' . l:nr . '\\"', 'E92') ! call assert_fails(':' . l:nr . 'wincmd ^', 'E16') ! call assert_fails(':0wincmd ^', 'E16') edit Xfoo | edit Xbar | edit Xbaz let l:foo_nr = bufnr('Xfoo') --- 154,162 ---- %bwipeout let l:nr = bufnr('%') + 1 ! call assert_fails(':execute "normal! ' . l:nr . '\\"', 'E92:') ! call assert_fails(':' . l:nr . 'wincmd ^', 'E16:') ! call assert_fails(':0wincmd ^', 'E16:') edit Xfoo | edit Xbar | edit Xbaz let l:foo_nr = bufnr('Xfoo') *** ../vim-8.2.1592/src/testdir/test_writefile.vim 2020-08-20 18:59:02.106779176 +0200 --- src/testdir/test_writefile.vim 2020-09-04 21:11:04.873226074 +0200 *************** *** 310,316 **** autocmd BufWritePre Xfile enew | write augroup END e Xfile ! call assert_fails('lockmarks write', ['E32', 'E203:']) augroup WriteTest au! augroup END --- 310,316 ---- autocmd BufWritePre Xfile enew | write augroup END e Xfile ! call assert_fails('lockmarks write', ['E32:', 'E203:']) augroup WriteTest au! augroup END *** ../vim-8.2.1592/src/version.c 2020-09-04 19:50:53.808691766 +0200 --- src/version.c 2020-09-04 21:12:53.464974110 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 1593, /**/ -- DENNIS: Listen -- strange women lying in ponds distributing swords is no basis for a system of government. Supreme executive power derives from a mandate from the masses, not from some farcical aquatic ceremony. The Quest for the Holy Grail (Monty Python) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///