To: vim_dev@googlegroups.com Subject: Patch 8.2.2847 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2847 Problem: Perl not tested sufficiently. Solution: Add test. Also test W17. (Dominique Pellé, closes #8193) Files: src/testdir/test_arabic.vim, src/testdir/test_perl.vim *** ../vim-8.2.2846/src/testdir/test_arabic.vim 2020-02-29 14:23:54.753706663 +0100 --- src/testdir/test_arabic.vim 2021-05-10 11:46:04.876021664 +0200 *************** *** 584,587 **** --- 584,595 ---- bwipe! endfunc + func Test_W17_arabic_requires_utf8() + let save_enc = &encoding + set encoding=latin1 arabic + call assert_match('^W17:', GetMessages()[-1]) + set arabic& + let &encoding = save_enc + endfunc + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.2846/src/testdir/test_perl.vim 2020-12-09 16:05:42.450846581 +0100 --- src/testdir/test_perl.vim 2021-05-10 11:46:04.876021664 +0200 *************** *** 1,6 **** --- 1,7 ---- " Tests for Perl interface source check.vim + source shared.vim CheckFeature perl " FIXME: RunTest don't see any error when Perl abort... *************** *** 52,57 **** --- 53,63 ---- perl @l = ('5' ..'7') perl $curbuf->Append(0, @l) call assert_equal(['5', '6', '7', '', '1', '2', '3', '4'], getline(1, '$')) + + perl $curbuf->Append(0) + call assert_match('^Usage: VIBUF::Append(vimbuf, lnum, @lines) at .* line 1\.$', + \ GetMessages()[-1]) + bwipe! endfunc *************** *** 61,66 **** --- 67,77 ---- perl $curbuf->Set(2, 'a', 'b', 'c') perl $curbuf->Set(4, 'A', 'B', 'C') call assert_equal(['1', 'a', 'b', 'A', 'B'], getline(1, '$')) + + perl $curbuf->Set(0) + call assert_match('^Usage: VIBUF::Set(vimbuf, lnum, @lines) at .* line 1\.$', + \ GetMessages()[-1]) + bwipe! endfunc *************** *** 210,215 **** --- 221,233 ---- perldo VIM::DoCommand("%d_") bwipe! + " Check a Perl expression which gives an error. + new + call setline(1, 'one') + perldo 1/0 + call assert_match('^Illegal division by zero at .* line 1\.$', GetMessages()[-1]) + bwipe! + " Check switching to another buffer does not trigger ml_get error. new let wincount = winnr('$') *************** *** 231,242 **** func Test_stdio() redir =>l:out perl << trim EOF ! VIM::Msg("&VIM::Msg"); print "STDOUT"; print STDERR "STDERR"; EOF redir END ! call assert_equal(['&VIM::Msg', 'STDOUT', 'STDERR'], split(l:out, "\n")) endfunc " Run first to get a clean namespace --- 249,261 ---- func Test_stdio() redir =>l:out perl << trim EOF ! VIM::Msg("VIM::Msg"); ! VIM::Msg("VIM::Msg Error", "Error"); print "STDOUT"; print STDERR "STDERR"; EOF redir END ! call assert_equal(['VIM::Msg', 'VIM::Msg Error', 'STDOUT', 'STDERR'], split(l:out, "\n")) endfunc " Run first to get a clean namespace *** ../vim-8.2.2846/src/version.c 2021-05-09 23:19:17.093003109 +0200 --- src/version.c 2021-05-10 11:49:08.843428267 +0200 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2847, /**/ -- hundred-and-one symptoms of being an internet addict: 264. You turn to the teletext page "surfing report" and are surprised that it is about sizes of waves and a weather forecast for seaside resorts. /// 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 ///