1
0
forked from aniani/vim

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.
This commit is contained in:
Bram Moolenaar
2021-03-05 20:58:22 +01:00
parent f9a65505d1
commit 8c801b374b
3 changed files with 13 additions and 1 deletions

View File

@@ -600,7 +600,7 @@ func Test_vim9_profiling()
call writefile(lines, 'Xprofile_crash.vim') call writefile(lines, 'Xprofile_crash.vim')
call system(GetVimCommandClean() . ' -es -c "so Xprofile_crash.vim" -c q') call system(GetVimCommandClean() . ' -es -c "so Xprofile_crash.vim" -c q')
call assert_equal(0, v:shell_error) 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.vim')
call delete('Xprofile_crash.log') call delete('Xprofile_crash.log')
endfunc endfunc

View File

@@ -5362,4 +5362,14 @@ func Test_qfbuf_update()
call Xqfbuf_update('l') call Xqfbuf_update('l')
endfunc 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 " vim: shiftwidth=2 sts=2 expandtab

View File

@@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
2571,
/**/ /**/
2570, 2570,
/**/ /**/