File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -186,6 +186,40 @@ def Test_FuzzyMru_SendToQuickfix()
186186 cclose
187187enddef
188188
189+ def Test_FuzzyQuickfix ()
190+ execute $ ' vimgrep /foo\|spam/j files{fs}*.txt'
191+ cclose
192+ h .Execute (' FuzzyQuickfix' )
193+ h .Type (" spam" )
194+ h .Enter ()
195+ assert_equal ($ ' files{fs}spam.txt' , bufname ())
196+ enddef
197+
198+ def Test_FuzzyQuickfix_OpenSplit ()
199+ execute $ ' vimgrep /foo\|spam/j files{fs}*.txt'
200+ cclose
201+ var winnr_before = winnr ()
202+ var wincount_before = winnr (' $' )
203+ h .Execute (' FuzzyQuickfix' )
204+ h .Type (' foo' )
205+ h .Type (" \<C-S> " )
206+ assert_equal ($ ' files{fs}foo.txt' , bufname ())
207+ assert_equal (wincount_before + 1 , winnr (' $' ))
208+ assert_notequal (winnr_before, winnr ())
209+ close
210+ enddef
211+
212+ def Test_FuzzyQuickfix_SendToQuickfix ()
213+ execute $ ' vimgrep /foo\|spam/j files{fs}*.txt'
214+ h .Execute (' FuzzyQuickfix' )
215+ h .Type (" spam" )
216+ h .Type (" \<C-Q> " )
217+ cwindow
218+ assert_notequal (stridx (getline (' .' ), $ ' files{fs}spam.txt' ), -1 )
219+ assert_equal (1 , len (getqflist ()))
220+ cclose
221+ enddef
222+
189223def Test_FuzzyMarks ()
190224 edit files /foo.txt
191225 edit files /spam.txt
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ export def Teardown()
3535 execute ' bwipe ' .. buf .bufnr
3636 endif
3737 endfor
38+ setqflist ([], ' f' )
3839 cd -
3940 &splitright = splitright
4041 &splitbelow = splitbelow
You can’t perform that action at this time.
0 commit comments