aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-01-01 04:47:35 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-01-01 04:58:05 -0500
commitd7b577d6ab38da8f199a616707a666c43e252ce3 (patch)
tree1b1b17d7d365223453471bc1b72a1b23dc679e60 /src/nvim/testdir
parentd1608f7503512b37650522cf5c8a3dce7add5e3b (diff)
downloadrneovim-d7b577d6ab38da8f199a616707a666c43e252ce3.tar.gz
rneovim-d7b577d6ab38da8f199a616707a666c43e252ce3.tar.bz2
rneovim-d7b577d6ab38da8f199a616707a666c43e252ce3.zip
vim-patch:8.1.1281: cannot specify a count with :chistory
Problem: Cannot specify a count with :chistory. Solution: Add a count to :chistory and :lhistory. (Yegappan Lakshmanan, closes vim/vim#4344) https://github.com/vim/vim/commit/8ffc7c8b5f004971cb6f2bdcfbe4f7123cce717c
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_quickfix.vim14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim
index f9d1abeaec..3646d37f9c 100644
--- a/src/nvim/testdir/test_quickfix.vim
+++ b/src/nvim/testdir/test_quickfix.vim
@@ -1918,9 +1918,23 @@ func HistoryTest(cchar)
call assert_equal(' error list 2 of 3; 2 ' . common, res[1])
call assert_equal('> error list 3 of 3; 3 ' . common, res[2])
+ " Test for changing the quickfix lists
+ call assert_equal(3, g:Xgetlist({'nr' : 0}).nr)
+ exe '1' . a:cchar . 'hist'
+ call assert_equal(1, g:Xgetlist({'nr' : 0}).nr)
+ exe '3' . a:cchar . 'hist'
+ call assert_equal(3, g:Xgetlist({'nr' : 0}).nr)
+ call assert_fails('-2' . a:cchar . 'hist', 'E16:')
+ call assert_fails('4' . a:cchar . 'hist', 'E16:')
+
call g:Xsetlist([], 'f')
let l = split(execute(a:cchar . 'hist'), "\n")
call assert_equal('No entries', l[0])
+ if a:cchar == 'c'
+ call assert_fails('4chist', 'E16:')
+ else
+ call assert_fails('4lhist', 'E776:')
+ endif
" An empty list should still show the stack history
call g:Xsetlist([])