summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_diffmode.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-02-19 23:00:50 +0100
committerBram Moolenaar <Bram@vim.org>2019-02-19 23:00:50 +0100
commitb9ddda6c2d98d99c09d58145c1b5b4042a8fd92c (patch)
treeb9ad408dfdd16ffd01276e8b583ff208133bf153 /src/testdir/test_diffmode.vim
parent66ae3d199fdcd732eb79266e913e4e6d2e82ee76 (diff)
patch 8.1.0956: using context:0 in 'diffopt' does not work wellv8.1.0956
Problem: Using context:0 in 'diffopt' does not work well. Solution: Make zero context do the same as one line context. (closes #4005)
Diffstat (limited to 'src/testdir/test_diffmode.vim')
-rw-r--r--src/testdir/test_diffmode.vim11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim
index 84fb4519c3..5a3a6beee4 100644
--- a/src/testdir/test_diffmode.vim
+++ b/src/testdir/test_diffmode.vim
@@ -783,6 +783,17 @@ func Test_diff_screen()
call WriteDiffFiles(buf, [1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])
call VerifyBoth(buf, 'Test_diff_06', '')
+ " Variants on test 6 with different context settings
+ call term_sendkeys(buf, ":set diffopt+=context:2\<cr>")
+ call VerifyScreenDump(buf, 'Test_diff_06.2', {})
+ call term_sendkeys(buf, ":set diffopt-=context:2\<cr>")
+ call term_sendkeys(buf, ":set diffopt+=context:1\<cr>")
+ call VerifyScreenDump(buf, 'Test_diff_06.1', {})
+ call term_sendkeys(buf, ":set diffopt-=context:1\<cr>")
+ call term_sendkeys(buf, ":set diffopt+=context:0\<cr>")
+ call VerifyScreenDump(buf, 'Test_diff_06.0', {})
+ call term_sendkeys(buf, ":set diffopt-=context:0\<cr>")
+
" Test 7 - 9: Test normal/patience/histogram diff algorithm
call WriteDiffFiles(buf, ['#include <stdio.h>', '', '// Frobs foo heartily', 'int frobnitz(int foo)', '{',
\ ' int i;', ' for(i = 0; i < 10; i++)', ' {', ' printf("Your answer is: ");',