To: vim_dev@googlegroups.com Subject: Patch 8.1.1956 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1956 Problem: Screenshot tests may use a different encoding. (Dominique Pelle) Solution: Always set 'encoding' to "utf-8" when running Vim in a terminal. (closes #4884) Files: src/testdir/shared.vim, src/testdir/test_popupwin.vim, src/testdir/dumps/Test_popupwin_behind.dump *** ../vim-8.1.1955/src/testdir/shared.vim 2019-08-31 17:48:16.725154231 +0200 --- src/testdir/shared.vim 2019-09-01 15:22:26.852527774 +0200 *************** *** 278,283 **** --- 278,286 ---- let cmd = substitute(cmd, '-u NONE', '--clean', '') let cmd = substitute(cmd, '--not-a-term', '', '') + " Force using utf-8, Vim may pick up something else from the environment. + let cmd ..= ' --cmd "set enc=utf8" ' + " Optionally run Vim under valgrind " let cmd = 'valgrind --tool=memcheck --leak-check=yes --num-callers=25 --log-file=valgrind ' . cmd *** ../vim-8.1.1955/src/testdir/test_popupwin.vim 2019-09-01 14:45:23.757964939 +0200 --- src/testdir/test_popupwin.vim 2019-09-01 15:12:05.963163582 +0200 *************** *** 1378,1384 **** " | | " +-----------------------------+ let lines =<< trim END - only split vsplit let info_window1 = getwininfo()[0] --- 1378,1383 ---- *************** *** 1649,1659 **** CheckFeature timers CheckScreendump ! call writefile([ ! \ "call setline(1, range(1, 20))", ! \ "hi Notification ctermbg=lightblue", ! \ "call popup_notification('first notification', {})", ! \], 'XtestNotifications') let buf = RunVimInTerminal('-S XtestNotifications', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_notify_01', {}) --- 1648,1659 ---- CheckFeature timers CheckScreendump ! let lines =<< trim END ! call setline(1, range(1, 20)) ! hi Notification ctermbg=lightblue ! call popup_notification('first notification', {}) ! END ! call writefile(lines, 'XtestNotifications') let buf = RunVimInTerminal('-S XtestNotifications', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_notify_01', {}) *** ../vim-8.1.1955/src/testdir/dumps/Test_popupwin_behind.dump 2019-06-02 14:11:51.865021060 +0200 --- src/testdir/dumps/Test_popupwin_behind.dump 2019-09-01 15:08:53.003982712 +0200 *************** *** 7,10 **** |~+0#4040ff13&| @34|l+0#0000001#ffd7ff255|i|n|e|4| +0#4040ff13#ffffff0@33 |~| @73 |[+1#0000000&|N|o| |N|a|m|e|]| @47|0|,|0|-|1| @9|A|l@1 ! |A+0&&|l|r|e|a|d|y| |o|n|l|y| |o|n|e| |w|i|n|d|o|w| @51 --- 7,10 ---- |~+0#4040ff13&| @34|l+0#0000001#ffd7ff255|i|n|e|4| +0#4040ff13#ffffff0@33 |~| @73 |[+1#0000000&|N|o| |N|a|m|e|]| @47|0|,|0|-|1| @9|A|l@1 ! | +0&&@74 *** ../vim-8.1.1955/src/version.c 2019-09-01 14:45:23.757964939 +0200 --- src/version.c 2019-09-01 15:08:45.080016336 +0200 *************** *** 763,764 **** --- 763,766 ---- { /* Add new patch number below this line */ + /**/ + 1956, /**/ -- hundred-and-one symptoms of being an internet addict: 159. You get excited whenever discussing your hard drive. /// 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 ///