aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorGrzegorz Milka <grzegorzmilka@gmail.com>2016-10-23 00:00:47 +0200
committerGrzegorz Milka <grzegorzmilka@gmail.com>2016-10-23 00:37:13 +0200
commitd7b942b54e4bae5510549ceffb3280e89871cff5 (patch)
treef25b395b5791e13d69dff7b4d4f66fb0edf66f0f /src/nvim/testdir
parent9ca90fdb9fda017962129125ea886fbf07345f62 (diff)
downloadrneovim-d7b942b54e4bae5510549ceffb3280e89871cff5.tar.gz
rneovim-d7b942b54e4bae5510549ceffb3280e89871cff5.tar.bz2
rneovim-d7b942b54e4bae5510549ceffb3280e89871cff5.zip
vim-patch:7.4.2237
Problem: Can't use "." and "$" with ":tab". Solution: Support a range for ":tab". (Hirohito Higashi) https://github.com/vim/vim/commit/9b7f8ce9eb3cb704f8cc14ab659bf86b1d6dc13c
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_tabpage.vim32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_tabpage.vim b/src/nvim/testdir/test_tabpage.vim
index e6b85d6e14..f1c41e967b 100644
--- a/src/nvim/testdir/test_tabpage.vim
+++ b/src/nvim/testdir/test_tabpage.vim
@@ -186,4 +186,36 @@ function Test_tabpage_with_autocmd()
bw!
endfunction
+function Test_tabpage_with_tab_modifier()
+ for n in range(4)
+ tabedit
+ endfor
+
+ function s:check_tab(pre_nr, cmd, post_nr)
+ exec 'tabnext ' . a:pre_nr
+ exec a:cmd
+ call assert_equal(a:post_nr, tabpagenr())
+ call assert_equal('help', &filetype)
+ helpclose
+ endfunc
+
+ call s:check_tab(1, 'tab help', 2)
+ call s:check_tab(1, '3tab help', 4)
+ call s:check_tab(1, '.tab help', 2)
+ call s:check_tab(1, '.+1tab help', 3)
+ call s:check_tab(1, '0tab help', 1)
+ call s:check_tab(2, '+tab help', 4)
+ call s:check_tab(2, '+2tab help', 5)
+ call s:check_tab(4, '-tab help', 4)
+ call s:check_tab(4, '-2tab help', 3)
+ call s:check_tab(3, '$tab help', 6)
+ call assert_fails('99tab help', 'E16:')
+ call assert_fails('+99tab help', 'E16:')
+ call assert_fails('-99tab help', 'E16:')
+
+ delfunction s:check_tab
+ tabonly!
+ bw!
+endfunction
+
" vim: shiftwidth=2 sts=2 expandtab