comparison src/testdir/test_quickfix.vim @ 16555:1302bc0b80db v8.1.1281

patch 8.1.1281: cannot specify a count with :chistory commit https://github.com/vim/vim/commit/8ffc7c8b5f004971cb6f2bdcfbe4f7123cce717c Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 5 21:00:26 2019 +0200 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 #4344)
author Bram Moolenaar <Bram@vim.org>
date Sun, 05 May 2019 21:15:05 +0200
parents 1d2b3bb35414
children 9c90cf08cfa8
comparison
equal deleted inserted replaced
16554:46b6265c641e 16555:1302bc0b80db
1829 let common = 'errors :set' . (a:cchar == 'c' ? 'qf' : 'loc') . 'list()' 1829 let common = 'errors :set' . (a:cchar == 'c' ? 'qf' : 'loc') . 'list()'
1830 call assert_equal(' error list 1 of 3; 1 ' . common, res[0]) 1830 call assert_equal(' error list 1 of 3; 1 ' . common, res[0])
1831 call assert_equal(' error list 2 of 3; 2 ' . common, res[1]) 1831 call assert_equal(' error list 2 of 3; 2 ' . common, res[1])
1832 call assert_equal('> error list 3 of 3; 3 ' . common, res[2]) 1832 call assert_equal('> error list 3 of 3; 3 ' . common, res[2])
1833 1833
1834 " Test for changing the quickfix lists
1835 call assert_equal(3, g:Xgetlist({'nr' : 0}).nr)
1836 exe '1' . a:cchar . 'hist'
1837 call assert_equal(1, g:Xgetlist({'nr' : 0}).nr)
1838 exe '3' . a:cchar . 'hist'
1839 call assert_equal(3, g:Xgetlist({'nr' : 0}).nr)
1840 call assert_fails('-2' . a:cchar . 'hist', 'E16:')
1841 call assert_fails('4' . a:cchar . 'hist', 'E16:')
1842
1834 call g:Xsetlist([], 'f') 1843 call g:Xsetlist([], 'f')
1835 let l = split(execute(a:cchar . 'hist'), "\n") 1844 let l = split(execute(a:cchar . 'hist'), "\n")
1836 call assert_equal('No entries', l[0]) 1845 call assert_equal('No entries', l[0])
1846 if a:cchar == 'c'
1847 call assert_fails('4chist', 'E16:')
1848 else
1849 call assert_fails('4lhist', 'E776:')
1850 endif
1837 1851
1838 " An empty list should still show the stack history 1852 " An empty list should still show the stack history
1839 call g:Xsetlist([]) 1853 call g:Xsetlist([])
1840 let res = split(execute(a:cchar . 'hist'), "\n") 1854 let res = split(execute(a:cchar . 'hist'), "\n")
1841 call assert_equal('> error list 1 of 1; 0 ' . common, res[0]) 1855 call assert_equal('> error list 1 of 1; 0 ' . common, res[0])