Mercurial > vim
comparison src/testdir/test_diffmode.vim @ 17614:d7708560b77c v8.1.1804
patch 8.1.1804: no test for display updating without a scroll region
commit https://github.com/vim/vim/commit/3c8ee629745737aa231fdd123826ae021e398e49
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 3 22:55:50 2019 +0200
patch 8.1.1804: no test for display updating without a scroll region
Problem: No test for display updating without a scroll region.
Solution: Add a test.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 03 Aug 2019 23:00:06 +0200 |
parents | f178127b7255 |
children | 4c7097a980a5 |
comparison
equal
deleted
inserted
replaced
17613:bc8071d1d2fc | 17614:d7708560b77c |
---|---|
1 " Tests for diff mode | 1 " Tests for diff mode |
2 source shared.vim | 2 source shared.vim |
3 source screendump.vim | 3 source screendump.vim |
4 source check.vim | |
4 | 5 |
5 func Test_diff_fold_sync() | 6 func Test_diff_fold_sync() |
6 enew! | 7 enew! |
7 let g:update_count = 0 | 8 let g:update_count = 0 |
8 au DiffUpdated * let g:update_count += 1 | 9 au DiffUpdated * let g:update_count += 1 |
746 call term_wait(a:buf) | 747 call term_wait(a:buf) |
747 call VerifyScreenDump(a:buf, a:dumpfile, {}) | 748 call VerifyScreenDump(a:buf, a:dumpfile, {}) |
748 endfunc | 749 endfunc |
749 | 750 |
750 func Test_diff_screen() | 751 func Test_diff_screen() |
751 if !CanRunVimInTerminal() || !has('menu') | 752 CheckScreendump |
752 throw 'Skipped: cannot make screendumps and/or menu feature missing' | 753 CheckFeature menu |
753 endif | 754 |
754 " clean up already existing swap files, just in case | 755 " clean up already existing swap files, just in case |
755 call delete('.Xfile1.swp') | 756 call delete('.Xfile1.swp') |
756 call delete('.Xfile2.swp') | 757 call delete('.Xfile2.swp') |
757 | 758 |
758 " Test 1: Add a line in beginning of file 2 | 759 " Test 1: Add a line in beginning of file 2 |
878 call delete('Xfile1') | 879 call delete('Xfile1') |
879 call delete('Xfile2') | 880 call delete('Xfile2') |
880 endfunc | 881 endfunc |
881 | 882 |
882 func Test_diff_with_cursorline() | 883 func Test_diff_with_cursorline() |
883 if !CanRunVimInTerminal() | 884 CheckScreendump |
884 throw 'Skipped: cannot run Vim in a terminal window' | |
885 endif | |
886 | 885 |
887 call writefile([ | 886 call writefile([ |
888 \ 'hi CursorLine ctermbg=red ctermfg=white', | 887 \ 'hi CursorLine ctermbg=red ctermfg=white', |
889 \ 'set cursorline', | 888 \ 'set cursorline', |
890 \ 'call setline(1, ["foo","foo","foo","bar"])', | 889 \ 'call setline(1, ["foo","foo","foo","bar"])', |
905 call StopVimInTerminal(buf) | 904 call StopVimInTerminal(buf) |
906 call delete('Xtest_diff_cursorline') | 905 call delete('Xtest_diff_cursorline') |
907 endfunc | 906 endfunc |
908 | 907 |
909 func Test_diff_of_diff() | 908 func Test_diff_of_diff() |
910 if !CanRunVimInTerminal() | 909 CheckScreendump |
911 throw 'Skipped: cannot run Vim in a terminal window' | 910 CheckFeature rightleft |
912 endif | |
913 if !has("rightleft") | |
914 throw 'Skipped: rightleft not supported' | |
915 endif | |
916 | 911 |
917 call writefile([ | 912 call writefile([ |
918 \ 'call setline(1, ["aa","bb","cc","@@ -3,2 +5,7 @@","dd","ee","ff"])', | 913 \ 'call setline(1, ["aa","bb","cc","@@ -3,2 +5,7 @@","dd","ee","ff"])', |
919 \ 'vnew', | 914 \ 'vnew', |
920 \ 'call setline(1, ["aa","bb","cc"])', | 915 \ 'call setline(1, ["aa","bb","cc"])', |