forked from aniani/vim
patch 8.2.1557: crash in :vimgrep when started as "vim -n"
Problem: Crash in :vimgrep when started as "vim -n". (Raul Segura) Solution: Check mfp pointer. (Yegappan Lakshmanan, closes #6827)
This commit is contained in:
@@ -2833,6 +2833,21 @@ func Test_vimgrep_with_no_last_search_pat()
|
||||
call delete('Xresult')
|
||||
endfunc
|
||||
|
||||
" Test vimgrep without swap file
|
||||
func Test_vimgrep_without_swap_file()
|
||||
let lines =<< trim [SCRIPT]
|
||||
vimgrep grep test_c*
|
||||
call writefile(['done'], 'Xresult')
|
||||
qall!
|
||||
[SCRIPT]
|
||||
call writefile(lines, 'Xscript')
|
||||
if RunVim([], [], '--clean -n -S Xscript Xscript')
|
||||
call assert_equal(['done'], readfile('Xresult'))
|
||||
endif
|
||||
call delete('Xscript')
|
||||
call delete('Xresult')
|
||||
endfunc
|
||||
|
||||
func Test_vimgrep_existing_swapfile()
|
||||
call writefile(['match apple with apple'], 'Xapple')
|
||||
call writefile(['swapfile'], '.Xapple.swp')
|
||||
|
||||
Reference in New Issue
Block a user