mirror of
https://github.com/neovim/neovim.git
synced 2025-09-20 10:18:18 +00:00
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:
@@ -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.
|
||||
|
Reference in New Issue
Block a user