vim-patch:partial:9.0.0719: too many delete() calls in tests

Problem:    Too many delete() calls in tests.
Solution:   Use deferred delete where possible.

56564964e6

This includes all changes expect changes in test_startup.vim.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2024-07-17 09:24:52 +08:00
parent e29f245a10
commit f17d819330
19 changed files with 126 additions and 231 deletions

View File

@@ -53,12 +53,10 @@ endfunc
" When deleting a file and immediately creating a new one the inode may be
" recycled. Vim should not recognize it as the same script.
func Test_different_script()
call writefile(['let s:var = "asdf"'], 'XoneScript')
call writefile(['let s:var = "asdf"'], 'XoneScript', 'D')
source XoneScript
call delete('XoneScript')
call writefile(['let g:var = s:var'], 'XtwoScript')
call writefile(['let g:var = s:var'], 'XtwoScript', 'D')
call assert_fails('source XtwoScript', 'E121:')
call delete('XtwoScript')
endfunc
" When sourcing a vim script, shebang should be ignored.