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.

8c801b374b

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
Jan Edmund Lazo
2025-12-10 13:15:25 -05:00
parent 8b79c32735
commit dccc35e6e9

View File

@@ -614,7 +614,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