diff src/testdir/test_quickfix.vim @ 24059:24887299c5ff v8.2.2571

patch 8.2.2571: test may leave file behind Commit: https://github.com/vim/vim/commit/8c801b374b7d32419cd877353495b801c5e1382a Author: Bram Moolenaar <Bram@vim.org> Date: Fri Mar 5 20:58:22 2021 +0100 patch 8.2.2571: test may leave file behind Problem: Test may leave file behind. Solution: Delete the temporary file. Don't profile in the running Vim instance.
author Bram Moolenaar <Bram@vim.org>
date Fri, 05 Mar 2021 21:00:04 +0100
parents 2a885d095bff
children 192058cad081
line wrap: on
line diff
--- a/src/testdir/test_quickfix.vim
+++ b/src/testdir/test_quickfix.vim
@@ -5362,4 +5362,14 @@ func Test_qfbuf_update()
   call Xqfbuf_update('l')
 endfunc
 
+func Test_vimgrep_noswapfile()
+  set noswapfile
+  call writefile(['one', 'two', 'three'], 'Xgreppie')
+  vimgrep two Xgreppie
+  call assert_equal('two', getline('.'))
+
+  call delete('Xgreppie')
+  set swapfile
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab