aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlonerover <pathfinder1644@yahoo.com>2016-12-23 09:14:19 +0800
committerlonerover <pathfinder1644@yahoo.com>2016-12-23 10:42:36 +0800
commit308836d5ceb3a354308d67bd20ae8d2bf9006e12 (patch)
treeb0f3f46c3ecd309fa273cf07a677ef5043ad38f1 /src
parent4682129449d84e7ed578d50ae20d8c688c849e2a (diff)
downloadrneovim-308836d5ceb3a354308d67bd20ae8d2bf9006e12.tar.gz
rneovim-308836d5ceb3a354308d67bd20ae8d2bf9006e12.tar.bz2
rneovim-308836d5ceb3a354308d67bd20ae8d2bf9006e12.zip
vim-patch:7.4.2126
Problem: No tests for :diffget and :diffput Solution: Add tests. https://github.com/vim/vim/commit/90d121fa3637b423169c64528efe84a1e67060c9
Diffstat (limited to 'src')
-rw-r--r--src/nvim/testdir/test_diffmode.vim39
-rw-r--r--src/nvim/version.c4
2 files changed, 40 insertions, 3 deletions
diff --git a/src/nvim/testdir/test_diffmode.vim b/src/nvim/testdir/test_diffmode.vim
index 39376bdabf..7666594862 100644
--- a/src/nvim/testdir/test_diffmode.vim
+++ b/src/nvim/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/nvim/version.c b/src/nvim/version.c
index e9233f9bfb..16801eb733 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -314,8 +314,8 @@ static int included_patches[] = {
// 2129 NA
2128,
// 2127,
- // 2126,
- // 2125,
+ 2126,
+ // 2125 NA
2124,
2123,
// 2122 NA