diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2019-09-04 07:19:17 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-04 07:19:17 -0700 |
| commit | 3468a466ed6e1b99ccd58e564cc44f8d3fa0924f (patch) | |
| tree | ac67718d90378902b083fd07eb246a207c2b7fe3 /src/nvim/testdir | |
| parent | fe60013fb9337a6d64dc179ca4a19787b3ccc8ea (diff) | |
| parent | 1838f6ba76b8387f7b26c8e6f9d76ce1c2dace68 (diff) | |
| download | rneovim-3468a466ed6e1b99ccd58e564cc44f8d3fa0924f.tar.gz rneovim-3468a466ed6e1b99ccd58e564cc44f8d3fa0924f.tar.bz2 rneovim-3468a466ed6e1b99ccd58e564cc44f8d3fa0924f.zip | |
Merge #10934 from janlazo/vim-8.0.1752
vim-patch:8.0.{1752,1844},8.1.0145
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_quickfix.vim | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index 90abb30da1..440bf47f4b 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -1167,6 +1167,13 @@ func Test_efm2() call assert_equal(1, len(l), string(l)) call assert_equal('|| msg2', l[0].text) + " When matching error lines, case should be ignored. Test for this. + set noignorecase + let l=getqflist({'lines' : ['Xtest:FOO10:Line 20'], 'efm':'%f:foo%l:%m'}) + call assert_equal(10, l.items[0].lnum) + call assert_equal('Line 20', l.items[0].text) + set ignorecase& + new | only let &efm = save_efm endfunc @@ -1802,6 +1809,9 @@ func Xproperty_tests(cchar) call assert_equal(0, s) let d = g:Xgetlist({"title":1}) call assert_equal('Sample', d.title) + " Try setting title to a non-string value + call assert_equal(-1, g:Xsetlist([], 'a', {'title' : ['Test']})) + call assert_equal('Sample', g:Xgetlist({"title":1}).title) Xopen call assert_equal('Sample', w:quickfix_title) @@ -1950,6 +1960,9 @@ func Xproperty_tests(cchar) call g:Xsetlist([], 'a', {'items' : [{'filename':'F1', 'lnum':10}]}) call assert_equal(10, g:Xgetlist({'items':1}).items[0].lnum) + " Try setting the items using a string + call assert_equal(-1, g:Xsetlist([], ' ', {'items' : 'Test'})) + " Save and restore the quickfix stack call g:Xsetlist([], 'f') call assert_equal(0, g:Xgetlist({'nr':'$'}).nr) @@ -3481,14 +3494,17 @@ func Xautocmd_changelist(cchar) call assert_equal(4, line('.')) autocmd! QuickFixCmdPost - " Test for grep/lgrep - call g:Xsetlist([], 'f') - Xexpr 'Xtestfile1:2:Line2' - autocmd QuickFixCmdPost * Xolder - silent Xgrep Line5 Xtestfile2 - call assert_equal('Xtestfile2', bufname('')) - call assert_equal(5, line('.')) - autocmd! QuickFixCmdPost + " The grepprg may not be set on non-Unix systems + if has('unix') + " Test for grep/lgrep + call g:Xsetlist([], 'f') + Xexpr 'Xtestfile1:2:Line2' + autocmd QuickFixCmdPost * Xolder + silent Xgrep Line5 Xtestfile2 + call assert_equal('Xtestfile2', bufname('')) + call assert_equal(5, line('.')) + autocmd! QuickFixCmdPost + endif " Test for vimgrep/lvimgrep call g:Xsetlist([], 'f') |