aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2018-08-16 03:05:35 -0400
committerJan Edmund Lazo <janedmundlazo@hotmail.com>2018-08-16 03:16:14 -0400
commit0f9622ca2501dcdd6b1af0d86b8353e9d2265973 (patch)
treece5eccd1b23c729453075da4664db1d975475974
parentb10d822a77ebc8111029adb3176f8c086026c303 (diff)
downloadrneovim-0f9622ca2501dcdd6b1af0d86b8353e9d2265973.tar.gz
rneovim-0f9622ca2501dcdd6b1af0d86b8353e9d2265973.tar.bz2
rneovim-0f9622ca2501dcdd6b1af0d86b8353e9d2265973.zip
vim-patch:8.0.1508: the :drop command is not always available
Problem: The :drop command is not always available. Solution: Include :drop in all builds. (Yasuhiro Matsumoto, closes vim/vim#2639) https://github.com/vim/vim/commit/5a656864a0610547da28e0c8c1649ecd1d782948
-rw-r--r--src/nvim/testdir/test_normal.vim3
-rw-r--r--src/nvim/testdir/test_tabpage.vim66
2 files changed, 32 insertions, 37 deletions
diff --git a/src/nvim/testdir/test_normal.vim b/src/nvim/testdir/test_normal.vim
index 4c63bd1f71..3ca3561876 100644
--- a/src/nvim/testdir/test_normal.vim
+++ b/src/nvim/testdir/test_normal.vim
@@ -2180,9 +2180,6 @@ func! Test_normal44_textobjects2()
endfunc
func! Test_normal45_drop()
- if !has("dnd")
- return
- endif
" basic test for :drop command
" unfortunately, without a gui, we can't really test much here,
" so simply test that ~p fails (which uses the drop register)
diff --git a/src/nvim/testdir/test_tabpage.vim b/src/nvim/testdir/test_tabpage.vim
index a2eec2cc11..add9b3d7cf 100644
--- a/src/nvim/testdir/test_tabpage.vim
+++ b/src/nvim/testdir/test_tabpage.vim
@@ -42,40 +42,38 @@ function Test_tabpage()
call assert_true(t:val_num == 100 && t:val_str == 'SetTabVar test' && t:val_list == ['red', 'blue', 'green'])
tabclose
- if has('nvim') || has('gui') || has('clientserver')
- " Test for ":tab drop exist-file" to keep current window.
- sp test1
- tab drop test1
- call assert_true(tabpagenr('$') == 1 && winnr('$') == 2 && winnr() == 1)
- close
- "
- "
- " Test for ":tab drop new-file" to keep current window of tabpage 1.
- split
- tab drop newfile
- call assert_true(tabpagenr('$') == 2 && tabpagewinnr(1, '$') == 2 && tabpagewinnr(1) == 1)
- tabclose
- q
- "
- "
- " Test for ":tab drop multi-opend-file" to keep current tabpage and window.
- new test1
- tabnew
- new test1
- tab drop test1
- call assert_true(tabpagenr() == 2 && tabpagewinnr(2, '$') == 2 && tabpagewinnr(2) == 1)
- tabclose
- q
- "
- "
- " Test for ":tab drop vertical-split-window" to jump test1 buffer
- tabedit test1
- vnew
- tabfirst
- tab drop test1
- call assert_equal([2, 2, 2, 2], [tabpagenr('$'), tabpagenr(), tabpagewinnr(2, '$'), tabpagewinnr(2)])
- 1tabonly
- endif
+ " Test for ":tab drop exist-file" to keep current window.
+ sp test1
+ tab drop test1
+ call assert_true(tabpagenr('$') == 1 && winnr('$') == 2 && winnr() == 1)
+ close
+ "
+ "
+ " Test for ":tab drop new-file" to keep current window of tabpage 1.
+ split
+ tab drop newfile
+ call assert_true(tabpagenr('$') == 2 && tabpagewinnr(1, '$') == 2 && tabpagewinnr(1) == 1)
+ tabclose
+ q
+ "
+ "
+ " Test for ":tab drop multi-opend-file" to keep current tabpage and window.
+ new test1
+ tabnew
+ new test1
+ tab drop test1
+ call assert_true(tabpagenr() == 2 && tabpagewinnr(2, '$') == 2 && tabpagewinnr(2) == 1)
+ tabclose
+ q
+ "
+ "
+ " Test for ":tab drop vertical-split-window" to jump test1 buffer
+ tabedit test1
+ vnew
+ tabfirst
+ tab drop test1
+ call assert_equal([2, 2, 2, 2], [tabpagenr('$'), tabpagenr(), tabpagewinnr(2, '$'), tabpagewinnr(2)])
+ 1tabonly
"
"
for i in range(9) | tabnew | endfor