diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-08-29 09:47:13 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-08-30 21:12:26 -0400 |
commit | 697a6ca2e4d3546432284f0dc7f60edff0cad4ef (patch) | |
tree | 633d8d7479011742a00bf2320447c8d6bc74e769 | |
parent | aa60cb10838996b1764fd8bed2f2c48467b3fab6 (diff) | |
download | rneovim-697a6ca2e4d3546432284f0dc7f60edff0cad4ef.tar.gz rneovim-697a6ca2e4d3546432284f0dc7f60edff0cad4ef.tar.bz2 rneovim-697a6ca2e4d3546432284f0dc7f60edff0cad4ef.zip |
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.
https://github.com/vim/vim/commit/248fdb33320641804afed4bdf5dc5cddb1cf64f5
-rw-r--r-- | src/nvim/testdir/test_diffmode.vim | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_diffmode.vim b/src/nvim/testdir/test_diffmode.vim index 51c7b7529e..f09a64c329 100644 --- a/src/nvim/testdir/test_diffmode.vim +++ b/src/nvim/testdir/test_diffmode.vim @@ -881,6 +881,42 @@ func Test_diff_with_cursorline() 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 |