To: vim_dev@googlegroups.com Subject: Patch 8.1.2041 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.2041 (after 8.1.2040) Problem: No test for diff mode with syntax highlighting. Solution: Add a test case. Files: src/testdir/test_diffmode.vim, src/testdir/dumps/Test_diff_syntax_1.dump *** ../vim-8.1.2040/src/testdir/test_diffmode.vim 2019-09-06 21:34:25.362847408 +0200 --- src/testdir/test_diffmode.vim 2019-09-15 19:27:46.496905301 +0200 *************** *** 905,910 **** --- 905,946 ---- call delete('Xtest_diff_cursorline') endfunc + func Test_diff_with_syntax() + CheckScreendump + + let lines =<< trim END + void doNothing() { + int x = 0; + char *s = "hello"; + return 5; + } + END + call writefile(lines, 'Xprogram1.c') + let lines =<< trim END + void doSomething() { + int x = 0; + char *s = "there"; + return 5; + } + END + call writefile(lines, 'Xprogram2.c') + + let lines =<< trim END + edit Xprogram1.c + diffsplit Xprogram2.c + END + call writefile(lines, 'Xtest_diff_syntax') + let buf = RunVimInTerminal('-S Xtest_diff_syntax', {}) + + call VerifyScreenDump(buf, 'Test_diff_syntax_1', {}) + + " clean up + call StopVimInTerminal(buf) + call delete('Xtest_diff_syntax') + call delete('Xprogram1.c') + call delete('Xprogram2.c') + endfunc + func Test_diff_of_diff() CheckScreendump CheckFeature rightleft *** ../vim-8.1.2040/src/testdir/dumps/Test_diff_syntax_1.dump 2019-09-15 19:31:00.364269154 +0200 --- src/testdir/dumps/Test_diff_syntax_1.dump 2019-09-15 19:28:21.476793586 +0200 *************** *** 0 **** --- 1,20 ---- + | +0#0000e05#a8a8a8255@1>v+0#00e0003#ffd7ff255|o|i|d| +0#0000000&|d|o|S+2&#ff404010|o|m|e|t+0&#ffd7ff255|h|i|n|g|(|)| |{| @52 + | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@10|i+0#00e0003&|n|t| +0#0000000&|x| |=| |0+0#e000002&|;+0#0000000&| @51 + | +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@10|c+0#00e0003&|h|a|r| +0#0000000&|*|s| |=| |"+0#e000002&|t+2&#ff404010|h|e|r|e|"+0&#ffd7ff255|;+0#0000000&| @43 + | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@10|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|5+0#e000002&|;+0#0000000&| @52 + | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@7|}| @63 + |~+0#4040ff13&| @73 + |~| @73 + |~| @73 + |~| @73 + |X+3#0000000&|p|r|o|g|r|a|m|2|.|c| @45|1|,|1| @11|A|l@1 + | +0#0000e05#a8a8a8255@1|v+0#00e0003#ffd7ff255|o|i|d| +0#0000000&|d|o|N+2&#ff404010|o|t+0&#ffd7ff255|h|i|n|g|(|)| |{| @54 + | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@10|i+0#00e0003&|n|t| +0#0000000&|x| |=| |0+0#e000002&|;+0#0000000&| @51 + | +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@10|c+0#00e0003&|h|a|r| +0#0000000&|*|s| |=| |"+0#e000002&|h+2&#ff404010|e|l@1|o|"+0&#ffd7ff255|;+0#0000000&| @43 + | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@10|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|5+0#e000002&|;+0#0000000&| @52 + | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@7|}| @63 + |~+0#4040ff13&| @73 + |~| @73 + |~| @73 + |X+1#0000000&|p|r|o|g|r|a|m|1|.|c| @45|1|,|1| @11|A|l@1 + |"+0&&|X|p|r|o|g|r|a|m|2|.|c|"| |5|L|,| |7|6|C| @53 *** ../vim-8.1.2040/src/version.c 2019-09-15 19:09:17.739668187 +0200 --- src/version.c 2019-09-15 19:29:23.660591448 +0200 *************** *** 759,760 **** --- 759,762 ---- { /* Add new patch number below this line */ + /**/ + 2041, /**/ -- hundred-and-one symptoms of being an internet addict: 271. You collect hilarious signatures from all 250 mailing lists you are subscribed to. /// 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 ///