From 7876f4f2181d889d68b25cb66a0ff82b1f84d68c Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 3 Sep 2019 23:24:32 -0400 Subject: vim-patch:8.0.1752: qf_set_properties() is to long Problem: qf_set_properties() is to long. Solution: Refactor the function. Define INVALID_QFIDX. (Yegappan Lakshmanan, closes vim/vim#2812) https://github.com/vim/vim/commit/a2aa8a2b22de909619d7faa3ff5383a6224defc5 --- src/nvim/testdir/test_quickfix.vim | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/nvim/testdir/test_quickfix.vim') diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index 90abb30da1..e805b5f663 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -1802,6 +1802,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 +1953,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) -- cgit From 9d50d033bc7a631d9011bb427816d2543deb66f6 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 4 Sep 2019 02:03:45 -0400 Subject: vim-patch:8.0.1844: superfluous quickfix code, missing examples Problem: Superfluous quickfix code, missing examples. Solution: Remove unneeded code. Add a few examples. Add a bit more testing. (Yegappan Lakshmanan, closes vim/vim#2916) https://github.com/vim/vim/commit/78ddc06bdd5c59cffdbb61eed7dcb5dcc4a17f19 --- src/nvim/testdir/test_quickfix.vim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/nvim/testdir/test_quickfix.vim') diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index e805b5f663..f328f069d5 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 -- cgit From 1838f6ba76b8387f7b26c8e6f9d76ce1c2dace68 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 4 Sep 2019 02:35:45 -0400 Subject: vim-patch:8.1.0145: test with grep is failing on MS-Windows Problem: Test with grep is failing on MS-Windows. Solution: Skip the test. https://github.com/vim/vim/commit/851332ea9cdabf24980a7f7c293da81fa990f864 --- src/nvim/testdir/test_quickfix.vim | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src/nvim/testdir/test_quickfix.vim') diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index f328f069d5..440bf47f4b 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -3494,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') -- cgit