To: vim_dev@googlegroups.com Subject: Patch 8.2.2656 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2656 Problem: Some command line arguments and regexp errors not tested. Solution: Add a few test cases. (Dominique Pellé, closes #8013) Files: src/testdir/test_regexp_latin.vim, src/testdir/test_startup.vim *** ../vim-8.2.2655/src/testdir/test_regexp_latin.vim 2020-12-09 16:36:00.404656177 +0100 --- src/testdir/test_regexp_latin.vim 2021-03-26 17:19:29.464374306 +0100 *************** *** 924,931 **** call assert_fails("call matchlist('x x', '\\%#=1 \\ze*')", 'E888:') call assert_fails("call matchlist('x x', '\\%#=2 \\zs*')", 'E888:') call assert_fails("call matchlist('x x', '\\%#=2 \\ze*')", 'E888:') - call assert_fails('exe "normal /\\%#=1\\%[x\\%[x]]\"', 'E369:') call assert_fails("call matchstr('abcd', '\\%o841\\%o142')", 'E678:') call assert_equal('', matchstr('abcd', '\%o181\%o142')) endfunc --- 924,940 ---- call assert_fails("call matchlist('x x', '\\%#=1 \\ze*')", 'E888:') call assert_fails("call matchlist('x x', '\\%#=2 \\zs*')", 'E888:') call assert_fails("call matchlist('x x', '\\%#=2 \\ze*')", 'E888:') call assert_fails("call matchstr('abcd', '\\%o841\\%o142')", 'E678:') + call assert_fails("call matchstr('abcd', '\\%#=2\\%2147483647c')", 'E951:') + call assert_fails("call matchstr('abcd', '\\%#=2\\%2147483647l')", 'E951:') + call assert_fails("call matchstr('abcd', '\\%#=2\\%2147483647v')", 'E951:') + call assert_fails('exe "normal /\\%#=1\\%[x\\%[x]]\"', 'E369:') + call assert_fails('exe "normal /\\%#=2\\%2147483647l\"', 'E951:') + call assert_fails('exe "normal /\\%#=2\\%2147483647c\"', 'E951:') + call assert_fails('exe "normal /\\%#=2\\%102261126v\"', 'E951:') + call assert_fails('exe "normal /\\%#=2\\%2147483646l\"', 'E486:') + call assert_fails('exe "normal /\\%#=2\\%2147483646c\"', 'E486:') + call assert_fails('exe "normal /\\%#=2\\%102261125v\"', 'E486:') call assert_equal('', matchstr('abcd', '\%o181\%o142')) endfunc *** ../vim-8.2.2655/src/testdir/test_startup.vim 2021-03-26 14:14:14.618292981 +0100 --- src/testdir/test_startup.vim 2021-03-26 17:19:29.464374306 +0100 *************** *** 860,869 **** \ 'Xtags') call writefile([' first', ' second', ' third'], 'Xfile1') ! if RunVim(before, after, '-t second') ! call assert_equal(['Xfile1:L2C5'], readfile('Xtestout')) ! call delete('Xtestout') ! endif call delete('Xtags') call delete('Xfile1') --- 860,871 ---- \ 'Xtags') call writefile([' first', ' second', ' third'], 'Xfile1') ! for t_arg in ['-t second', '-tsecond'] ! if RunVim(before, after, '-t second') ! call assert_equal(['Xfile1:L2C5'], readfile('Xtestout'), t_arg) ! call delete('Xtestout') ! endif ! endfor call delete('Xtags') call delete('Xfile1') *************** *** 1064,1073 **** " A number argument sets the 'window' option call writefile(["iwindow \=&window\\:wq! Xresult\"], 'Xscriptin', 'b') ! if RunVim([], [], '-s Xscriptin -w 17') ! call assert_equal(["window 17"], readfile('Xresult')) ! call delete('Xresult') ! endif call delete('Xscriptin') endfunc --- 1066,1077 ---- " A number argument sets the 'window' option call writefile(["iwindow \=&window\\:wq! Xresult\"], 'Xscriptin', 'b') ! for w_arg in ['-w 17', '-w17'] ! if RunVim([], [], '-s Xscriptin ' .. w_arg) ! call assert_equal(["window 17"], readfile('Xresult'), w_arg) ! call delete('Xresult') ! endif ! endfor call delete('Xscriptin') endfunc *** ../vim-8.2.2655/src/version.c 2021-03-26 14:14:14.618292981 +0100 --- src/version.c 2021-03-26 17:21:47.132003797 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2656, /**/ -- How To Keep A Healthy Level Of Insanity: 17. When the money comes out the ATM, scream "I won!, I won! 3rd time this week!!!!!" /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///