summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-07-30 19:11:25 +0200
committerBram Moolenaar <Bram@vim.org>2016-07-30 19:11:25 +0200
commit90d121fa3637b423169c64528efe84a1e67060c9 (patch)
treed989ced835c486908a66ce49376d541a288ac5f1
parentb20617b0b0d15523961618717d6cd2195674c363 (diff)
downloadvim-git-90d121fa3637b423169c64528efe84a1e67060c9.tar.gz
patch 7.4.2126v7.4.2126
Problem: No tests for :diffget and :diffput Solution: Add tests.
-rw-r--r--src/testdir/test_diffmode.vim39
-rw-r--r--src/version.c2
2 files changed, 40 insertions, 1 deletions
diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim
index 39376bdab..766659486 100644
--- a/src/testdir/test_diffmode.vim
+++ b/src/testdir/test_diffmode.vim
@@ -162,6 +162,43 @@ func Test_filler_lines()
wincmd h
call assert_equal(1, line('w0'))
unlet! diff_fdm diff_fdc
+ windo diffoff
+ bwipe!
+ enew!
+endfunc
- windo bw!
+func Test_diffget_diffput()
+ enew!
+ let l = range(50)
+ call setline(1, l)
+ call assert_fails('diffget', 'E99:')
+ diffthis
+ call assert_fails('diffget', 'E100:')
+ new
+ let l[10] = 'one'
+ let l[20] = 'two'
+ let l[30] = 'three'
+ let l[40] = 'four'
+ call setline(1, l)
+ diffthis
+ call assert_equal('one', getline(11))
+ 11diffget
+ call assert_equal('10', getline(11))
+ 21diffput
+ wincmd w
+ call assert_equal('two', getline(21))
+ normal 31Gdo
+ call assert_equal('three', getline(31))
+ call assert_equal('40', getline(41))
+ normal 41Gdp
+ wincmd w
+ call assert_equal('40', getline(41))
+ new
+ diffthis
+ call assert_fails('diffget', 'E101:')
+
+ windo diffoff
+ bwipe!
+ bwipe!
+ enew!
endfunc
diff --git a/src/version.c b/src/version.c
index 429dda03f..f456729f5 100644
--- a/src/version.c
+++ b/src/version.c
@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2126,
+/**/
2125,
/**/
2124,