patch 9.0.0719: too many delete() calls in tests
Problem: Too many delete() calls in tests.
Solution: Use deferred delete where possible.
diff --git a/src/testdir/test_spell_utf8.vim b/src/testdir/test_spell_utf8.vim
index 91ada1e..bb2c354 100644
--- a/src/testdir/test_spell_utf8.vim
+++ b/src/testdir/test_spell_utf8.vim
@@ -726,8 +726,8 @@
" Test with SAL instead of SOFO items; test automatic reloading
func Test_spell_sal_and_addition()
set spellfile=
- call writefile(g:test_data_dic1, "Xtest.dic")
- call writefile(g:test_data_aff_sal, "Xtest.aff")
+ call writefile(g:test_data_dic1, "Xtest.dic", 'D')
+ call writefile(g:test_data_aff_sal, "Xtest.aff", 'D')
mkspell! Xtest Xtest
set spl=Xtest.utf-8.spl spell
call assert_equal('kbltykk', soundfold('goobledygoook'))
@@ -735,7 +735,7 @@
call assert_equal('*fls kswts tl', soundfold('oeverloos gezwets edale'))
"also use an addition file
- call writefile(["/regions=usgbnz", "elequint/2", "elekwint/3"], "Xtest.utf-8.add")
+ call writefile(["/regions=usgbnz", "elequint/2", "elekwint/3"], "Xtest.utf-8.add", 'D')
mkspell! Xtest.utf-8.add.spl Xtest.utf-8.add
bwipe!