To: vim_dev@googlegroups.com Subject: Patch 8.2.0448 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0448 Problem: Various functions not properly tested. Solution: Add more tests, especially for failures. (Yegappan Lakshmanan, closes #5843) Files: runtime/doc/eval.txt, src/testdir/test_blob.vim, src/testdir/test_breakindent.vim, src/testdir/test_charsearch.vim, src/testdir/test_clientserver.vim, src/testdir/test_cmdline.vim, src/testdir/test_exists.vim, src/testdir/test_expand_func.vim, src/testdir/test_expr.vim, src/testdir/test_file_perm.vim, src/testdir/test_functions.vim, src/testdir/test_gui.vim, src/testdir/test_listdict.vim, src/testdir/test_marks.vim, src/testdir/test_partial.vim, src/testdir/test_registers.vim, src/testdir/test_search.vim, src/testdir/test_spell.vim, src/testdir/test_substitute.vim, src/testdir/test_syn_attr.vim, src/testdir/test_syntax.vim, src/testdir/test_taglist.vim, src/testdir/test_utf8.vim, src/testdir/test_vartabs.vim, src/testdir/test_window_cmd.vim *** ../vim-8.2.0447/runtime/doc/eval.txt 2020-03-22 16:16:48.548189763 +0100 --- runtime/doc/eval.txt 2020-03-25 22:12:13.414159513 +0100 *************** *** 8792,8797 **** --- 8804,8810 ---- *setreg()* setreg({regname}, {value} [, {options}]) Set the register {regname} to {value}. + If {regname} is "" or "@", the unnamed register '"' is used. {value} may be any value returned by |getreg()|, including a |List|. If {options} contains "a" or {regname} is upper case, *** ../vim-8.2.0447/src/testdir/test_blob.vim 2020-03-20 18:20:47.080975621 +0100 --- src/testdir/test_blob.vim 2020-03-25 22:12:13.414159513 +0100 *************** *** 286,291 **** --- 286,293 ---- call assert_equal(3, 0z11110111->index(0x11, 2)) call assert_equal(2, index(0z11111111, 0x11, -2)) call assert_equal(3, index(0z11110111, 0x11, -2)) + call assert_equal(0, index(0z11110111, 0x11, -10)) + call assert_fails("echo index(0z11110111, 0x11, [])", 'E745:') call assert_fails('call index("asdf", 0)', 'E897:') endfunc *************** *** 331,333 **** --- 333,337 ---- call assert_fails('call sort(["abc", 0z11], "f")', 'E702:') endif endfunc + + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.0447/src/testdir/test_breakindent.vim 2020-02-23 15:17:24.499956118 +0100 --- src/testdir/test_breakindent.vim 2020-03-25 22:12:13.414159513 +0100 *************** *** 417,422 **** --- 417,423 ---- let width = strlen(text[1:]) + indent(2) + strlen(&sbr) * 3 " text wraps 3 times call assert_equal(width, strdisplaywidth(text)) call s:close_windows('set sbr=') + call assert_equal(4, strdisplaywidth("\t", 4)) endfunc func Test_breakindent11_vartabs() *************** *** 694,696 **** --- 695,699 ---- call s:compare_lines(expect, lines) call s:close_windows('set breakindent& briopt& sbr&') endfunc + + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.0447/src/testdir/test_charsearch.vim 2020-03-10 07:48:06.571619551 +0100 --- src/testdir/test_charsearch.vim 2020-03-25 22:12:13.414159513 +0100 *************** *** 29,34 **** --- 29,36 ---- set cpo-=; normal! ;;p call assert_equal('ZabcdeZfghijkZZemnokqretkZvwxyz', getline(3)) + + call assert_fails("call setcharsearch([])", 'E715:') enew! endfunc *** ../vim-8.2.0447/src/testdir/test_clientserver.vim 2019-09-06 21:16:03.000000000 +0200 --- src/testdir/test_clientserver.vim 2020-03-25 22:12:13.414159513 +0100 *************** *** 98,104 **** --- 98,108 ---- call job_stop(job, 'kill') endif endtry + + call assert_fails("let x=remote_peek([])", 'E730:') endfunc " Uncomment this line to get a debugging log " call ch_logfile('channellog', 'w') + + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.0447/src/testdir/test_cmdline.vim 2020-03-22 21:23:43.558965830 +0100 --- src/testdir/test_cmdline.vim 2020-03-25 22:12:13.414159513 +0100 *************** *** 68,73 **** --- 68,78 ---- call assert_equal('"e Xtestfile3 Xtestfile4', @:) cd - + cnoremap wildmenumode() + call feedkeys(":cd Xdir\\\\"\", 'tx') + call assert_equal('"cd Xdir1/1', @:) + cunmap + " cleanup %bwipe call delete('Xdir1/Xdir2/Xtestfile4') *** ../vim-8.2.0447/src/testdir/test_exists.vim 2020-02-16 13:33:52.047371845 +0100 --- src/testdir/test_exists.vim 2020-03-25 22:12:13.414159513 +0100 *************** *** 68,73 **** --- 68,77 ---- " Existing environment variable let $EDITOR_NAME = 'Vim Editor' call assert_equal(1, exists('$EDITOR_NAME')) + if has('unix') + " ${name} environment variables are supported only on Unix-like systems + call assert_equal(1, exists('${VIM}')) + endif " Non-existing environment variable call assert_equal(0, exists('$NON_ENV_VAR')) *************** *** 323,325 **** --- 327,331 ---- func Test_exists_funcarg() call FuncArg_Tests("arg1", "arg2") endfunc + + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.0447/src/testdir/test_expand_func.vim 2020-03-06 20:35:46.120669845 +0100 --- src/testdir/test_expand_func.vim 2020-03-25 22:12:13.414159513 +0100 *************** *** 83,88 **** --- 83,89 ---- call assert_equal('test_expand_func.vim', expand('test_expand_func.vim', 1)) call assert_equal(['test_expand_func.vim'], \ expand('test_expand_func.vim', 1, 1)) + call assert_fails("call expand('*', [])", 'E745:') set wildignore& endfunc *** ../vim-8.2.0447/src/testdir/test_expr.vim 2020-03-20 18:20:47.080975621 +0100 --- src/testdir/test_expr.vim 2020-03-25 22:12:13.414159513 +0100 *************** *** 59,64 **** --- 59,66 ---- call assert_equal(-1, strgetchar('axb', -1)) call assert_equal(-1, strgetchar('axb', 3)) call assert_equal(-1, strgetchar('', 0)) + call assert_fails("let c=strgetchar([], 1)", 'E730:') + call assert_fails("let c=strgetchar('axb', [])", 'E745:') endfunc func Test_strcharpart() *************** *** 444,449 **** --- 446,454 ---- endfunc " recursive call works call assert_equal('-y-x-', substitute('xxx', 'x\(.\)x', {-> '-' . Recurse() . '-' . submatch(1) . '-'}, '')) + + call assert_fails("let s=submatch([])", 'E745:') + call assert_fails("let s=submatch(2, [])", 'E745:') endfunc func Test_invalid_submatch() *** ../vim-8.2.0447/src/testdir/test_file_perm.vim 2019-08-24 22:30:05.000000000 +0200 --- src/testdir/test_file_perm.vim 2020-03-25 22:12:13.414159513 +0100 *************** *** 21,24 **** --- 21,30 ---- call assert_equal(1, setfperm('Xtest', 'rwx------')) call delete('Xtest') + + call assert_fails("call setfperm(['Xfile'], 'rw-rw-rw-')", 'E730:') + call assert_fails("call setfperm('Xfile', [])", 'E730:') + call assert_fails("call setfperm('Xfile', 'rwxrwxrwxrw')", 'E475:') endfunc + + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.0447/src/testdir/test_functions.vim 2020-03-22 16:16:48.548189763 +0100 --- src/testdir/test_functions.vim 2020-03-25 22:22:39.386984174 +0100 *************** *** 24,31 **** --- 24,41 ---- call assert_equal(1, has('eval')) call assert_equal(1, has('eval', 1)) + if has('unix') + call assert_equal(1, or(has('ttyin'), 1)) + call assert_equal(0, and(has('ttyout'), 0)) + call assert_equal(1, has('multi_byte_encoding')) + endif + call assert_equal(0, has('nonexistent')) call assert_equal(0, has('nonexistent', 1)) + + " Will we ever have patch 9999? + let ver = 'patch-' .. v:version / 100 .. '.' .. v:version % 100 .. '.9999' + call assert_equal(0, has(ver)) endfunc func Test_empty() *************** *** 476,481 **** --- 486,493 ---- call assert_equal('abcdefg', 'abcdefg'->strpart(-2)) call assert_equal('fg', strpart('abcdefg', 5, 4)) call assert_equal('defg', strpart('abcdefg', 3)) + call assert_equal('', strpart('abcdefg', 10)) + call assert_fails("let s=strpart('abcdef', [])", 'E745:') call assert_equal('lép', strpart('éléphant', 2, 4)) call assert_equal('léphant', strpart('éléphant', 2)) *************** *** 629,634 **** --- 641,655 ---- func Test_tr() call assert_equal('foo', tr('bar', 'bar', 'foo')) call assert_equal('zxy', 'cab'->tr('abc', 'xyz')) + call assert_fails("let s=tr([], 'abc', 'def')", 'E730:') + call assert_fails("let s=tr('abc', [], 'def')", 'E730:') + call assert_fails("let s=tr('abc', 'abc', [])", 'E730:') + call assert_fails("let s=tr('abcd', 'abcd', 'def')", 'E475:') + set encoding=latin1 + call assert_fails("let s=tr('abcd', 'abcd', 'def')", 'E475:') + call assert_equal('hEllO', tr('hello', 'eo', 'EO')) + call assert_equal('hello', tr('hello', 'xy', 'ab')) + set encoding=utf8 endfunc " Tests for the mode() function *************** *** 840,845 **** --- 861,868 ---- call assert_equal(-1, stridx('hello', 'l', 10)) call assert_equal(2, stridx('hello', 'll')) call assert_equal(-1, stridx('hello', 'hello world')) + call assert_fails("let n=stridx('hello', [])", 'E730:') + call assert_fails("let n=stridx([], 'l')", 'E730:') endfunc func Test_strridx() *************** *** 856,861 **** --- 879,886 ---- call assert_equal(-1, strridx('hello', 'l', -1)) call assert_equal(2, strridx('hello', 'll')) call assert_equal(-1, strridx('hello', 'hello world')) + call assert_fails("let n=strridx('hello', [])", 'E730:') + call assert_fails("let n=strridx([], 'l')", 'E730:') endfunc func Test_match_func() *************** *** 865,870 **** --- 890,900 ---- call assert_equal(-1, match('testing', 'ing', 8)) call assert_equal(1, match(['vim', 'testing', 'execute'], 'ing')) call assert_equal(-1, match(['vim', 'testing', 'execute'], 'img')) + call assert_fails("let x=match('vim', [])", 'E730:') + call assert_equal(3, match(['a', 'b', 'c', 'a'], 'a', 1)) + call assert_equal(-1, match(['a', 'b', 'c', 'a'], 'a', 5)) + call assert_equal(4, match('testing', 'ing', -1)) + call assert_fails("let x=match('testing', 'ing', 0, [])", 'E745:') endfunc func Test_matchend() *************** *** 971,976 **** --- 1001,1007 ---- bw! endfunc + " Test for byteidx() and byteidxcomp() functions func Test_byteidx() let a = '.é.' " one char of two bytes call assert_equal(0, byteidx(a, 0)) *************** *** 990,995 **** --- 1021,1027 ---- call assert_equal(4, b->byteidx(2)) call assert_equal(5, b->byteidx(3)) call assert_equal(-1, b->byteidx(4)) + call assert_fails("call byteidx([], 0)", 'E730:') call assert_equal(0, b->byteidxcomp(0)) call assert_equal(1, b->byteidxcomp(1)) *************** *** 997,1002 **** --- 1029,1035 ---- call assert_equal(4, b->byteidxcomp(3)) call assert_equal(5, b->byteidxcomp(4)) call assert_equal(-1, b->byteidxcomp(5)) + call assert_fails("call byteidxcomp([], 0)", 'E730:') endfunc func Test_count() *************** *** 1177,1182 **** --- 1210,1231 ---- xunmap delfunc T + " Test for the visual line start and end marks '< and '> + call setline(1, ['one', 'one two', 'one two three']) + "normal! ggVG + call feedkeys("ggVG\", 'xt') + call assert_equal(1, col("'<")) + call assert_equal(14, col("'>")) + " Delete the last line of the visually selected region + $d + call assert_notequal(14, col("'>")) + + " Test with 'virtualedit' + set virtualedit=all + call cursor(1, 10) + call assert_equal(4, col('.')) + set virtualedit& + bw! endfunc *************** *** 1343,1348 **** --- 1392,1399 ---- let chars = join(map(range(1, 0x20) + [0xa0], {n -> n->nr2char()}), '') call assert_equal("x", trim(chars . "x" . chars)) + + call assert_fails('let c=trim([])', 'E730:') endfunc " Test for reg_recording() and reg_executing() *************** *** 1726,1731 **** --- 1777,1785 ---- func Test_char2nr() call assert_equal(12354, char2nr('あ', 1)) call assert_equal(120, 'x'->char2nr()) + set encoding=latin1 + call assert_equal(120, 'x'->char2nr()) + set encoding=utf-8 endfunc func Test_eventhandler() *************** *** 1931,1936 **** --- 1985,1991 ---- " index() call assert_equal(1, index(range(1, 5), 2)) + call assert_fails("echo index([1, 2], 1, [])", 'E745:') " inputlist() call feedkeys(":let result = inputlist(range(10))\1\", 'x') *************** *** 2089,2094 **** --- 2144,2154 ---- " uniq() call assert_equal([0, 1, 2, 3, 4], uniq(range(5))) + + " errors + call assert_fails('let x=range(2, 8, 0)', 'E726:') + call assert_fails('let x=range(3, 1)', 'E727:') + call assert_fails('let x=range(1, 3, -2)', 'E727:') endfunc func Test_echoraw() *************** *** 2107,2110 **** --- 2167,2191 ---- call delete('XTest_echoraw') endfunc + " Test for the eval() function + func Test_eval() + call assert_fails("call eval('5 a')", 'E488:') + endfunc + + " Test for the nr2char() function + func Test_nr2char() + set encoding=latin1 + call assert_equal('@', nr2char(64)) + set encoding=utf8 + call assert_equal('a', nr2char(97, 1)) + call assert_equal('a', nr2char(97, 0)) + endfunc + + " Test for screenattr(), screenchar() and screenchars() functions + func Test_screen_functions() + call assert_equal(-1, screenattr(-1, -1)) + call assert_equal(-1, screenchar(-1, -1)) + call assert_equal([], screenchars(-1, -1)) + endfunc + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.0447/src/testdir/test_gui.vim 2019-12-01 15:05:40.000000000 +0100 --- src/testdir/test_gui.vim 2020-03-25 22:12:13.414159513 +0100 *************** *** 75,80 **** --- 75,81 ---- elseif has('gui_gtk2') || has('gui_gnome') || has('gui_gtk3') " Invalid font name. The result should be the name plus the default size. call assert_equal('notexist 10', getfontname('notexist')) + call assert_equal('', getfontname('*')) " Valid font name. This is usually the real name of Monospace by default. let fname = 'Bitstream Vera Sans Mono 12' *************** *** 825,827 **** --- 826,830 ---- call delete('Xscriptgui') call delete('Xtestgui') endfunc + + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.0447/src/testdir/test_listdict.vim 2020-03-20 18:20:47.080975621 +0100 --- src/testdir/test_listdict.vim 2020-03-25 22:12:13.414159513 +0100 *************** *** 302,307 **** --- 302,308 ---- let l[1] = l2 let l3 = deepcopy(l2) call assert_true(l3[1] is l3[2]) + call assert_fails("call deepcopy([1, 2], 2)", 'E474:') endfunc " Locked variables *************** *** 381,386 **** --- 382,392 ---- call assert_equal(expected[depth][u][1], ps) endfor endfor + call assert_fails("let x=islocked('a b')", 'E488:') + let mylist = [1, 2, 3] + call assert_fails("let x = islocked('mylist[1:2]')", 'E786:') + let mydict = {'k' : 'v'} + call assert_fails("let x = islocked('mydict.a')", 'E716:') endfunc " Unletting locked variables *************** *** 629,635 **** call assert_fails('call reverse("")', 'E899:') endfunc ! " splitting a string to a List func Test_str_split() call assert_equal(['aa', 'bb'], split(' aa bb ')) call assert_equal(['aa', 'bb'], split(' aa bb ', '\W\+', 0)) --- 635,641 ---- call assert_fails('call reverse("")', 'E899:') endfunc ! " splitting a string to a List using split() func Test_str_split() call assert_equal(['aa', 'bb'], split(' aa bb ')) call assert_equal(['aa', 'bb'], split(' aa bb ', '\W\+', 0)) *************** *** 640,645 **** --- 646,653 ---- call assert_equal(['aa', '', 'bb', 'cc', ''], split('aa,,bb, cc,', ',\s*', 1)) call assert_equal(['a', 'b', 'c'], split('abc', '\zs')) call assert_equal(['', 'a', '', 'b', '', 'c', ''], split('abc', '\zs', 1)) + call assert_fails("call split('abc', [])", 'E730:') + call assert_fails("call split('abc', 'b', [])", 'E745:') endfunc " compare recursively linked list and dict *** ../vim-8.2.0447/src/testdir/test_marks.vim 2020-03-20 18:20:47.080975621 +0100 --- src/testdir/test_marks.vim 2020-03-25 22:12:13.414159513 +0100 *************** *** 90,95 **** --- 90,97 ---- call setpos('.', [0, 1, -1, 0]) call assert_equal([2, 2], [line('.'), col('.')]) + call assert_fails("call setpos('ab', [0, 1, 1, 0])", 'E474:') + bwipe! call win_gotoid(twowin) bwipe! *** ../vim-8.2.0447/src/testdir/test_partial.vim 2020-01-30 18:24:47.001204003 +0100 --- src/testdir/test_partial.vim 2020-03-25 22:12:13.414159513 +0100 *************** *** 83,88 **** --- 83,91 ---- let dict = {"tr": function('tr', ['hello', 'h', 'H'])} call assert_equal("Hello", dict.tr()) + + call assert_fails("let F=function('setloclist', 10)", "E923:") + call assert_fails("let F=function('setloclist', [], [])", "E922:") endfunc func Test_partial_implicit() *************** *** 389,391 **** --- 392,396 ---- call assert_true(F1 isnot# F1d1) " Partial /= non-partial call assert_true(d1.f1 isnot# d1.f1) " handle_subscript creates new partial each time endfunc + + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.0447/src/testdir/test_registers.vim 2020-03-10 07:48:06.575619533 +0100 --- src/testdir/test_registers.vim 2020-03-25 22:12:13.414159513 +0100 *************** *** 235,242 **** --- 235,250 ---- call assert_equal('', getreg("\")) call assert_equal('', getreg("\")) call assert_equal('', getreg("\")) + " Change the last used register to '"' for the next test + normal! ""yy + let @" = 'happy' + call assert_equal('happy', getreg()) + call assert_equal('happy', getreg('')) call assert_equal('', getregtype('!')) + call assert_fails('echo getregtype([])', 'E730:') + call assert_equal('v', getregtype()) + call assert_equal('v', getregtype('')) " Test for inserting an invalid register content call assert_beeps('exe "normal i\!"') *************** *** 316,321 **** --- 324,335 ---- normal 0".gP call assert_equal('abcabcabc', getline(1)) + let @"='' + call setreg('', '1') + call assert_equal('1', @") + call setreg('@', '2') + call assert_equal('2', @") + enew! endfunc *** ../vim-8.2.0447/src/testdir/test_search.vim 2020-03-19 15:05:23.886554687 +0100 --- src/testdir/test_search.vim 2020-03-25 22:12:13.414159513 +0100 *************** *** 1385,1390 **** --- 1385,1399 ---- close! endfunc + " Test for error cases with the search() function + func Test_search_errors() + call assert_fails("call search('pat', [])", 'E730:') + call assert_fails("call search('pat', 'b', {})", 'E728:') + call assert_fails("call search('pat', 'b', 1, [])", 'E745:') + call assert_fails("call search('pat', 'ns')", 'E475:') + call assert_fails("call search('pat', 'mr')", 'E475:') + endfunc + func Test_search_display_pattern() new call setline(1, ['foo', 'bar', 'foobar']) *** ../vim-8.2.0447/src/testdir/test_spell.vim 2020-03-18 19:32:22.514363313 +0100 --- src/testdir/test_spell.vim 2020-03-25 22:12:13.414159513 +0100 *************** *** 160,165 **** --- 160,168 ---- call assert_equal(['Third'], spellsuggest('THird', 1)) call assert_equal(['All'], spellsuggest('ALl', 1)) + call assert_fails("call spellsuggest('maxch', [])", 'E745:') + call assert_fails("call spellsuggest('maxch', 2, [])", 'E745:') + set spell& endfunc *************** *** 1164,1166 **** --- 1167,1171 ---- \"SAL ZZ- _", \"SAL Z S", \ ] + + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.0447/src/testdir/test_substitute.vim 2020-02-11 22:03:43.042846213 +0100 --- src/testdir/test_substitute.vim 2020-03-25 22:12:13.414159513 +0100 *************** *** 242,247 **** --- 242,252 ---- setl nomodifiable call assert_fails('s/foo/bar/', 'E21:') + call assert_fails("let s=substitute([], 'a', 'A', 'g')", 'E730:') + call assert_fails("let s=substitute('abcda', [], 'A', 'g')", 'E730:') + call assert_fails("let s=substitute('abcda', 'a', [], 'g')", 'E730:') + call assert_fails("let s=substitute('abcda', 'a', 'A', [])", 'E730:') + bwipe! endfunc *** ../vim-8.2.0447/src/testdir/test_syn_attr.vim 2019-09-13 21:24:25.000000000 +0200 --- src/testdir/test_syn_attr.vim 2020-03-25 22:12:13.414159513 +0100 *************** *** 4,9 **** --- 4,11 ---- hi Mine term=bold cterm=italic call assert_equal('Mine', synIDattr(hlID("Mine"), "name")) call assert_equal('', synIDattr("Mine"->hlID(), "bg", 'term')) + call assert_equal('', synIDattr("Mine"->hlID(), "fg", 'term')) + call assert_equal('', synIDattr("Mine"->hlID(), "sp", 'term')) call assert_equal('1', synIDattr(hlID("Mine"), "bold", 'term')) call assert_equal('1', synIDattr(hlID("Mine"), "italic", 'cterm')) hi Mine term=reverse cterm=inverse *************** *** 819,821 **** --- 821,825 ---- hi Mine guifg=blanchedalmond hi Mine guifg=BLANCHEDALMOND endfunc + + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.0447/src/testdir/test_syntax.vim 2019-12-27 17:20:51.533918083 +0100 --- src/testdir/test_syntax.vim 2020-03-25 22:12:13.414159513 +0100 *************** *** 532,537 **** --- 532,539 ---- call assert_equal(['cComment', 'cTodo'], map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")')) call assert_equal(['Comment', 'Todo'], map(synstack(line("."), col(".")), 'synIDattr(synIDtrans(v:val), "name")')) + call assert_fails("let n=synIDtrans([])", 'E745:') + syn clear bw! endfunc *************** *** 631,633 **** --- 633,637 ---- call delete('Xccc.c') call delete('Xddd.c') endfunc + + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.0447/src/testdir/test_taglist.vim 2020-03-16 21:25:16.998615353 +0100 --- src/testdir/test_taglist.vim 2020-03-25 22:12:13.418159501 +0100 *************** *** 36,41 **** --- 36,43 ---- call assert_equal('d', cmd[0]['kind']) call assert_equal('call cursor(3, 4)', cmd[0]['cmd']) + call assert_fails("let l=taglist([])", 'E730:') + call delete('Xtags') set tags& bwipe *** ../vim-8.2.0447/src/testdir/test_utf8.vim 2019-09-07 17:51:59.000000000 +0200 --- src/testdir/test_utf8.vim 2020-03-25 22:12:13.418159501 +0100 *************** *** 20,25 **** --- 20,27 ---- call assert_equal(exp[i][1], inp[i]->strchars(0)) call assert_equal(exp[i][2], strchars(inp[i], 1)) endfor + call assert_fails("let v=strchars('abc', [])", 'E474:') + call assert_fails("let v=strchars('abc', 2)", 'E474:') endfunc " Test for customlist completion *************** *** 99,104 **** --- 101,107 ---- let lres = str2list(s, 1) let sres = list2str(l, 1) + call assert_equal([65, 66, 67], str2list("ABC")) let &encoding = save_encoding call assert_equal(l, lres) *************** *** 138,140 **** --- 141,145 ---- bwipe! endfunc + + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.0447/src/testdir/test_vartabs.vim 2020-03-06 20:35:46.120669845 +0100 --- src/testdir/test_vartabs.vim 2020-03-25 22:12:13.418159501 +0100 *************** *** 369,374 **** --- 369,376 ---- let lines = ScreenLines([1, 3], winwidth(0)) call s:compare_lines(expect4, lines) + call assert_fails('call shiftwidth([])', 'E745:') + " cleanup bw! bw! *** ../vim-8.2.0447/src/testdir/test_window_cmd.vim 2020-03-23 19:28:40.599056151 +0100 --- src/testdir/test_window_cmd.vim 2020-03-25 22:12:13.418159501 +0100 *************** *** 525,530 **** --- 525,531 ---- call assert_equal(2, tabpagenr('$')) call assert_equal(['Xb', 'Xa'], map(tabpagebuflist(1), 'bufname(v:val)')) call assert_equal(['Xc' ], map(2->tabpagebuflist(), 'bufname(v:val)')) + call assert_equal(['Xc' ], map(tabpagebuflist(), 'bufname(v:val)')) %bw! endfunc *** ../vim-8.2.0447/src/version.c 2020-03-25 21:27:19.278387463 +0100 --- src/version.c 2020-03-25 22:13:00.178014481 +0100 *************** *** 740,741 **** --- 740,743 ---- { /* Add new patch number below this line */ + /**/ + 448, /**/ -- ARTHUR: Be quiet! DENNIS: --but by a two-thirds majority in the case of more-- ARTHUR: Be quiet! I order you to be quiet! WOMAN: Order, eh -- who does he think he is? ARTHUR: I am your king! 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 ///