To: vim_dev@googlegroups.com Subject: Patch 8.0.1578 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1578 Problem: No test for :popup in terminal. Solution: Add a screen dump test. Files: src/testdir/test_popup.vim, src/testdir/dumps/Test_popup_command_01.dump, src/testdir/dumps/Test_popup_command_02.dump, src/testdir/dumps/Test_popup_command_03.dump *** ../vim-8.0.1577/src/testdir/test_popup.vim 2018-02-24 21:25:25.198496653 +0100 --- src/testdir/test_popup.vim 2018-03-06 12:39:51.187360166 +0100 *************** *** 786,789 **** --- 786,818 ---- call delete('Xtest') endfunc + func Test_popup_command() + if !CanRunVimInTerminal() || !has('menu') + return + endif + + call writefile([ + \ 'one two three four five', + \ 'and one two Xthree four five', + \ 'one more two three four five', + \ ], 'Xtest') + let buf = RunVimInTerminal('Xtest', {}) + call term_sendkeys(buf, ":source $VIMRUNTIME/menu.vim\") + call term_sendkeys(buf, "/X\:popup PopUp\") + call VerifyScreenDump(buf, 'Test_popup_command_01', {}) + + " Select a word + call term_sendkeys(buf, "jj") + call VerifyScreenDump(buf, 'Test_popup_command_02', {}) + + " Select a word + call term_sendkeys(buf, "j\") + call VerifyScreenDump(buf, 'Test_popup_command_03', {}) + + call term_sendkeys(buf, "\") + call StopVimInTerminal(buf) + call delete('Xtest') + endfunc + + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.0.1577/src/testdir/dumps/Test_popup_command_01.dump 2018-03-06 13:21:48.840194219 +0100 --- src/testdir/dumps/Test_popup_command_01.dump 2018-03-06 12:37:42.848140298 +0100 *************** *** 0 **** --- 1,20 ---- + |o+0&#ffffff0|n|e| |t|w|o| |t|h|r|e@1| |f|o|u|r| |f|i|v|e| @51 + |a|n|d| |o|n|e| |t|w|o| |X|t|h|r|e@1| |f|o|u|r| |f|i|v|e| @46 + |o|n|e| |m|o|r|e| |t|w| +0#0000001#ffd7ff255|U|n|d|o| @12| +0#0000000#ffffff0@45 + |~+0#4040ff13&| @9| +0#0000001#ffd7ff255@17| +0#4040ff13#ffffff0@45 + |~| @9| +0#0000001#ffd7ff255|P|a|s|t|e| @11| +0#4040ff13#ffffff0@45 + |~| @9| +0#0000001#ffd7ff255@17| +0#4040ff13#ffffff0@45 + |~| @9| +0#0000001#ffd7ff255|S|e|l|e|c|t| |W|o|r|d| @5| +0#4040ff13#ffffff0@45 + |~| @9| +0#0000001#ffd7ff255|S|e|l|e|c|t| |S|e|n|t|e|n|c|e| @1| +0#4040ff13#ffffff0@45 + |~| @9| +0#0000001#ffd7ff255|S|e|l|e|c|t| |P|a|r|a|g|r|a|p|h| | +0#4040ff13#ffffff0@45 + |~| @9| +0#0000001#ffd7ff255|S|e|l|e|c|t| |L|i|n|e| @5| +0#4040ff13#ffffff0@45 + |~| @9| +0#0000001#ffd7ff255|S|e|l|e|c|t| |B|l|o|c|k| @4| +0#4040ff13#ffffff0@45 + |~| @9| +0#0000001#ffd7ff255|S|e|l|e|c|t| |A|l@1| @6| +0#4040ff13#ffffff0@45 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + |:+0#0000000&|p|o|p|u|p| |P|o|p|U|p| @34|:| @8> @17 *** ../vim-8.0.1577/src/testdir/dumps/Test_popup_command_02.dump 2018-03-06 13:21:48.848194171 +0100 --- src/testdir/dumps/Test_popup_command_02.dump 2018-03-06 12:40:09.355249767 +0100 *************** *** 0 **** --- 1,20 ---- + |o+0&#ffffff0|n|e| |t|w|o| |t|h|r|e@1| |f|o|u|r| |f|i|v|e| @51 + |a|n|d| |o|n|e| |t|w|o| >X|t|h|r|e@1| |f|o|u|r| |f|i|v|e| @46 + |o|n|e| |m|o|r|e| |t|w| +0#0000001#ffd7ff255|U|n|d|o| @12| +0#0000000#ffffff0@45 + |~+0#4040ff13&| @9| +0#0000001#ffd7ff255@17| +0#4040ff13#ffffff0@45 + |~| @9| +0#0000001#e0e0e08|P|a|s|t|e| @11| +0#4040ff13#ffffff0@45 + |~| @9| +0#0000001#ffd7ff255@17| +0#4040ff13#ffffff0@45 + |~| @9| +0#0000001#ffd7ff255|S|e|l|e|c|t| |W|o|r|d| @5| +0#4040ff13#ffffff0@45 + |~| @9| +0#0000001#ffd7ff255|S|e|l|e|c|t| |S|e|n|t|e|n|c|e| @1| +0#4040ff13#ffffff0@45 + |~| @9| +0#0000001#ffd7ff255|S|e|l|e|c|t| |P|a|r|a|g|r|a|p|h| | +0#4040ff13#ffffff0@45 + |~| @9| +0#0000001#ffd7ff255|S|e|l|e|c|t| |L|i|n|e| @5| +0#4040ff13#ffffff0@45 + |~| @9| +0#0000001#ffd7ff255|S|e|l|e|c|t| |B|l|o|c|k| @4| +0#4040ff13#ffffff0@45 + |~| @9| +0#0000001#ffd7ff255|S|e|l|e|c|t| |A|l@1| @6| +0#4040ff13#ffffff0@45 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + |:+0#0000000&|p|o|p|u|p| |P|o|p|U|p| @34|:| @8| @17 *** ../vim-8.0.1577/src/testdir/dumps/Test_popup_command_03.dump 2018-03-06 13:21:48.852194148 +0100 --- src/testdir/dumps/Test_popup_command_03.dump 2018-03-06 12:40:10.487242888 +0100 *************** *** 0 **** --- 1,20 ---- + |o+0&#ffffff0|n|e| |t|w|o| |t|h|r|e@1| |f|o|u|r| |f|i|v|e| @51 + |a|n|d| |o|n|e| |t|w|o| |X+0&#e0e0e08|t|h|r|e@1> +0&#ffffff0|f|o|u|r| |f|i|v|e| @46 + |o|n|e| |m|o|r|e| |t|w|o| |t|h|r|e@1| |f|o|u|r| |f|i|v|e| @46 + |~+0#4040ff13&| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + |-+2#0000000&@1| |V|I|S|U|A|L| |-@1| +0&&@34|7| @8|2|,|1|9| @9|A|l@1| *** ../vim-8.0.1577/src/version.c 2018-03-06 13:17:19.793809675 +0100 --- src/version.c 2018-03-06 13:21:29.644309454 +0100 *************** *** 768,769 **** --- 768,771 ---- { /* Add new patch number below this line */ + /**/ + 1578, /**/ -- Mrs Abbott: I'm a paediatrician. Basil: Feet? Mrs Abbott: Children. Sybil: Oh, Basil! Basil: Well, children have feet, don't they? That's how they move around, my dear. You must take a look next time, it's most interesting. (Fawlty Towers) /// 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 ///