]> granicus.if.org Git - vim/commitdiff
patch 8.2.2571: test may leave file behind v8.2.2571
authorBram Moolenaar <Bram@vim.org>
Fri, 5 Mar 2021 19:58:22 +0000 (20:58 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 5 Mar 2021 19:58:22 +0000 (20:58 +0100)
Problem:    Test may leave file behind.
Solution:   Delete the temporary file.  Don't profile in the running Vim
            instance.

src/testdir/test_profile.vim
src/testdir/test_quickfix.vim
src/version.c

index 785cee3270933f49b20d156a7ba05c57f530805c..13f5fae56621ffaaa6d61e6960e0e02a738e033d 100644 (file)
@@ -600,7 +600,7 @@ func Test_vim9_profiling()
   call writefile(lines, 'Xprofile_crash.vim')
   call system(GetVimCommandClean() . ' -es -c "so Xprofile_crash.vim" -c q')
   call assert_equal(0, v:shell_error)
-  call CheckScriptSuccess(lines)
+  call assert_true(readfile('Xprofile_crash.log')->len() > 10)
   call delete('Xprofile_crash.vim')
   call delete('Xprofile_crash.log')
 endfunc
index 6ade32622685ca3aacb5806baeab5f19f382649e..6f25f1dff0c8f24a38fbd5cadaff9c31fcc8156e 100644 (file)
@@ -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
index add4c38daca8735757282034def6c09c6fd8b17f..58908cda18784ab17ac8793473ad1ac923be4996 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2571,
 /**/
     2570,
 /**/