mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-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.
248fdb3332
This commit is contained in:
parent
aa60cb1083
commit
697a6ca2e4
@ -881,6 +881,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
|
||||||
|
Loading…
Reference in New Issue
Block a user