diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-06-21 22:44:33 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-06-23 18:17:09 -0400 |
commit | ff244a1309482e818c6731038f0232fae613431c (patch) | |
tree | e082b45b6aa474973da7faf780555bc059ee5711 /src/nvim/testdir/test_quickfix.vim | |
parent | f99e314da06fa50fcc2a6a2bf0833ea365f121a9 (diff) | |
download | rneovim-ff244a1309482e818c6731038f0232fae613431c.tar.gz rneovim-ff244a1309482e818c6731038f0232fae613431c.tar.bz2 rneovim-ff244a1309482e818c6731038f0232fae613431c.zip |
vim-patch:8.1.0165: :clist output can be very long
Problem: :clist output can be very long.
Solution: Support filtering :clist entries. (Yegappan Lakshmanan)
https://github.com/vim/vim/commit/4cde86c2ef885e82fff3d925dee9fb5671c025cf
Diffstat (limited to 'src/nvim/testdir/test_quickfix.vim')
-rw-r--r-- | src/nvim/testdir/test_quickfix.vim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index 4d78c67f5c..ce0b8f1be8 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -3373,6 +3373,23 @@ func Test_lbuffer_with_bwipe() augroup END endfunc +" Tests for the ':filter /pat/ clist' command +func Test_filter_clist() + cexpr ['Xfile1:10:10:Line 10', 'Xfile2:15:15:Line 15'] + call assert_equal([' 2 Xfile2:15 col 15: Line 15'], + \ split(execute('filter /Line 15/ clist'), "\n")) + call assert_equal([' 1 Xfile1:10 col 10: Line 10'], + \ split(execute('filter /Xfile1/ clist'), "\n")) + call assert_equal([], split(execute('filter /abc/ clist'), "\n")) + + call setqflist([{'module' : 'abc', 'pattern' : 'pat1'}, + \ {'module' : 'pqr', 'pattern' : 'pat2'}], ' ') + call assert_equal([' 2 pqr:pat2: '], + \ split(execute('filter /pqr/ clist'), "\n")) + call assert_equal([' 1 abc:pat1: '], + \ split(execute('filter /pat1/ clist'), "\n")) +endfunc + func Test_setloclist_in_aucmd() " This was using freed memory. augroup nasty |