summaryrefslogtreecommitdiff
path: root/src/testdir/test_diffmode.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-09-15 19:31:28 +0200
committerBram Moolenaar <Bram@vim.org>2019-09-15 19:31:28 +0200
commit248fdb33320641804afed4bdf5dc5cddb1cf64f5 (patch)
treeb89128f084d9674c4cd608a4060dbc049d636138 /src/testdir/test_diffmode.vim
parente00fdf35d069de4effe07125333bb9ff35b1915d (diff)
downloadvim-git-248fdb33320641804afed4bdf5dc5cddb1cf64f5.tar.gz
patch 8.1.2041: no test for diff mode with syntax highlightingv8.1.2041
Problem: No test for diff mode with syntax highlighting. Solution: Add a test case.
Diffstat (limited to 'src/testdir/test_diffmode.vim')
-rw-r--r--src/testdir/test_diffmode.vim36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim
index 8280a2cb7..8ad86ada8 100644
--- a/src/testdir/test_diffmode.vim
+++ b/src/testdir/test_diffmode.vim
@@ -905,6 +905,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