Skip to content

Commit 8c801b3

Browse files
committed
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.
1 parent f9a6550 commit 8c801b3

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

src/testdir/test_profile.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ func Test_vim9_profiling()
600600
call writefile(lines, 'Xprofile_crash.vim')
601601
call system(GetVimCommandClean() . ' -es -c "so Xprofile_crash.vim" -c q')
602602
call assert_equal(0, v:shell_error)
603-
call CheckScriptSuccess(lines)
603+
call assert_true(readfile('Xprofile_crash.log')->len() > 10)
604604
call delete('Xprofile_crash.vim')
605605
call delete('Xprofile_crash.log')
606606
endfunc

src/testdir/test_quickfix.vim

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5362,4 +5362,14 @@ func Test_qfbuf_update()
53625362
call Xqfbuf_update('l')
53635363
endfunc
53645364

5365+
func Test_vimgrep_noswapfile()
5366+
set noswapfile
5367+
call writefile(['one', 'two', 'three'], 'Xgreppie')
5368+
vimgrep two Xgreppie
5369+
call assert_equal('two', getline('.'))
5370+
5371+
call delete('Xgreppie')
5372+
set swapfile
5373+
endfunc
5374+
53655375
" vim: shiftwidth=2 sts=2 expandtab

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
2571,
753755
/**/
754756
2570,
755757
/**/

0 commit comments

Comments
 (0)