comparison src/testdir/test_diffmode.vim @ 18092:995925603ea0 v8.1.2041

patch 8.1.2041: no test for diff mode with syntax highlighting Commit: https://github.com/vim/vim/commit/248fdb33320641804afed4bdf5dc5cddb1cf64f5 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Sep 15 19:31:28 2019 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Sun, 15 Sep 2019 19:45:03 +0200
parents 0dcc2ee838dd
children 41484f342f80
comparison
equal deleted inserted replaced
18091:c1ae47339f5c 18092:995925603ea0
903 " clean up 903 " clean up
904 call StopVimInTerminal(buf) 904 call StopVimInTerminal(buf)
905 call delete('Xtest_diff_cursorline') 905 call delete('Xtest_diff_cursorline')
906 endfunc 906 endfunc
907 907
908 func Test_diff_with_syntax()
909 CheckScreendump
910
911 let lines =<< trim END
912 void doNothing() {
913 int x = 0;
914 char *s = "hello";
915 return 5;
916 }
917 END
918 call writefile(lines, 'Xprogram1.c')
919 let lines =<< trim END
920 void doSomething() {
921 int x = 0;
922 char *s = "there";
923 return 5;
924 }
925 END
926 call writefile(lines, 'Xprogram2.c')
927
928 let lines =<< trim END
929 edit Xprogram1.c
930 diffsplit Xprogram2.c
931 END
932 call writefile(lines, 'Xtest_diff_syntax')
933 let buf = RunVimInTerminal('-S Xtest_diff_syntax', {})
934
935 call VerifyScreenDump(buf, 'Test_diff_syntax_1', {})
936
937 " clean up
938 call StopVimInTerminal(buf)
939 call delete('Xtest_diff_syntax')
940 call delete('Xprogram1.c')
941 call delete('Xprogram2.c')
942 endfunc
943
908 func Test_diff_of_diff() 944 func Test_diff_of_diff()
909 CheckScreendump 945 CheckScreendump
910 CheckFeature rightleft 946 CheckFeature rightleft
911 947
912 call writefile([ 948 call writefile([