comparison src/testdir/test_quickfix.vim @ 14299:932dde1d8a71 v8.1.0165

patch 8.1.0165: :clist output can be very long commit https://github.com/vim/vim/commit/4cde86c2ef885e82fff3d925dee9fb5671c025cf Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 8 16:01:08 2018 +0200 patch 8.1.0165: :clist output can be very long Problem: :clist output can be very long. Solution: Support filtering :clist entries. (Yegappan Lakshmanan)
author Christian Brabandt <cb@256bit.org>
date Sun, 08 Jul 2018 16:15:05 +0200
parents 71bb93bf9a44
children 19d99d9e670c
comparison
equal deleted inserted replaced
14298:4a588e3afd4a 14299:932dde1d8a71
3485 3485
3486 func Test_autocmd_changelist() 3486 func Test_autocmd_changelist()
3487 call Xautocmd_changelist('c') 3487 call Xautocmd_changelist('c')
3488 call Xautocmd_changelist('l') 3488 call Xautocmd_changelist('l')
3489 endfunc 3489 endfunc
3490
3491 " Tests for the ':filter /pat/ clist' command
3492 func Test_filter_clist()
3493 cexpr ['Xfile1:10:10:Line 10', 'Xfile2:15:15:Line 15']
3494 call assert_equal([' 2 Xfile2:15 col 15: Line 15'],
3495 \ split(execute('filter /Line 15/ clist'), "\n"))
3496 call assert_equal([' 1 Xfile1:10 col 10: Line 10'],
3497 \ split(execute('filter /Xfile1/ clist'), "\n"))
3498 call assert_equal([], split(execute('filter /abc/ clist'), "\n"))
3499
3500 call setqflist([{'module' : 'abc', 'pattern' : 'pat1'},
3501 \ {'module' : 'pqr', 'pattern' : 'pat2'}], ' ')
3502 call assert_equal([' 2 pqr:pat2: '],
3503 \ split(execute('filter /pqr/ clist'), "\n"))
3504 call assert_equal([' 1 abc:pat1: '],
3505 \ split(execute('filter /pat1/ clist'), "\n"))
3506 endfunc