0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

patch 8.1.2041: no test for diff mode with syntax highlighting

Problem:    No test for diff mode with syntax highlighting.
Solution:   Add a test case.
This commit is contained in:
Bram Moolenaar
2019-09-15 19:31:28 +02:00
parent e00fdf35d0
commit 248fdb3332
3 changed files with 58 additions and 0 deletions

View File

@@ -0,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

View File

@@ -905,6 +905,42 @@ func Test_diff_with_cursorline()
call delete('Xtest_diff_cursorline') call delete('Xtest_diff_cursorline')
endfunc 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() func Test_diff_of_diff()
CheckScreendump CheckScreendump
CheckFeature rightleft CheckFeature rightleft

View File

@@ -757,6 +757,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
2041,
/**/ /**/
2040, 2040,
/**/ /**/