aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2016-12-14 15:33:06 -0500
committerJames McCoy <jamessan@jamessan.com>2016-12-27 14:10:28 -0500
commit2c59277ca867cb3cb0144adedcfe05373d5498de (patch)
treeb0e300dd9cd10698d3f1f19641855a6a0e38a488 /src/nvim/testdir
parentf224f3fbf11ffd3095843c597045ca95c8241fcf (diff)
downloadrneovim-2c59277ca867cb3cb0144adedcfe05373d5498de.tar.gz
rneovim-2c59277ca867cb3cb0144adedcfe05373d5498de.tar.bz2
rneovim-2c59277ca867cb3cb0144adedcfe05373d5498de.zip
vim-patch:7.4.2010
Problem: There is a :cbottom command but no :lbottom command. Solution: Add :lbottom. (Yegappan Lakshmanan) https://github.com/vim/vim/commit/537ef08408c50e0c4104d57f74993b3b0ed9560d
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_quickfix.vim23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim
index 7b141f17a4..f30902b915 100644
--- a/src/nvim/testdir/test_quickfix.vim
+++ b/src/nvim/testdir/test_quickfix.vim
@@ -15,6 +15,7 @@ function! s:setup_commands(cchar)
command! -nargs=* Xnewer <mods>cnewer <args>
command! -nargs=* Xopen <mods>copen <args>
command! -nargs=* Xwindow <mods>cwindow <args>
+ command! -nargs=* Xbottom <mods>cbottom <args>
command! -nargs=* Xclose <mods>cclose <args>
command! -nargs=* -bang Xfile <mods>cfile<bang> <args>
command! -nargs=* Xgetfile <mods>cgetfile <args>
@@ -44,6 +45,7 @@ function! s:setup_commands(cchar)
command! -nargs=* Xnewer <mods>lnewer <args>
command! -nargs=* Xopen <mods>lopen <args>
command! -nargs=* Xwindow <mods>lwindow <args>
+ command! -nargs=* Xbottom <mods>lbottom <args>
command! -nargs=* Xclose <mods>lclose <args>
command! -nargs=* -bang Xfile <mods>lfile<bang> <args>
command! -nargs=* Xgetfile <mods>lgetfile <args>
@@ -200,6 +202,7 @@ function XwindowTests(cchar)
Xwindow
call assert_true(winnr('$') == 2 && winnr() == 2 &&
\ getline('.') ==# 'Xtestfile1|1 col 3| Line1')
+ redraw!
" Close the window
Xclose
@@ -1397,15 +1400,23 @@ echo string(loc_two)
call delete('Xtwo', 'rf')
endfunc
-function Test_cbottom()
- call setqflist([{'filename': 'foo', 'lnum': 42}])
- copen
+function XbottomTests(cchar)
+ call s:setup_commands(a:cchar)
+
+ call g:Xsetlist([{'filename': 'foo', 'lnum': 42}])
+ Xopen
let wid = win_getid()
call assert_equal(1, line('.'))
wincmd w
- call setqflist([{'filename': 'var', 'lnum': 24}], 'a')
- cbottom
+ call g:Xsetlist([{'filename': 'var', 'lnum': 24}], 'a')
+ Xbottom
call win_gotoid(wid)
call assert_equal(2, line('.'))
- cclose
+ Xclose
endfunc
+
+" Tests for the :cbottom and :lbottom commands
+function Test_cbottom()
+ call XbottomTests('c')
+ call XbottomTests('l')
+endfunction