aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_quickfix.vim
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-17 11:05:33 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-17 11:09:35 -0400
commitb9fe30cac2967a4f7bc29d32a3cf1196fa3a1f3a (patch)
treea5fc7392ee76a62d00437e010e036a09342b8e9a /src/nvim/testdir/test_quickfix.vim
parentafd4888c6ae0430cb9e9b26a4b43734b7f39610f (diff)
downloadrneovim-b9fe30cac2967a4f7bc29d32a3cf1196fa3a1f3a.tar.gz
rneovim-b9fe30cac2967a4f7bc29d32a3cf1196fa3a1f3a.tar.bz2
rneovim-b9fe30cac2967a4f7bc29d32a3cf1196fa3a1f3a.zip
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 vim/vim#6827) https://github.com/vim/vim/commit/997cd1a17f030d004b334d17cf1c1c57050c9906
Diffstat (limited to 'src/nvim/testdir/test_quickfix.vim')
-rw-r--r--src/nvim/testdir/test_quickfix.vim20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim
index 1124032966..d46233991c 100644
--- a/src/nvim/testdir/test_quickfix.vim
+++ b/src/nvim/testdir/test_quickfix.vim
@@ -1,8 +1,7 @@
" Test for the quickfix commands.
-if !has('quickfix')
- finish
-endif
+source check.vim
+CheckFeature quickfix
set encoding=utf-8
@@ -2568,6 +2567,21 @@ func Test_vimgrep_incsearch()
set noincsearch
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')