diff src/testdir/test_spell.vim @ 29383:e76e18a20d9c v9.0.0034

patch 9.0.0034: spell tests do not always clear the word list Commit: https://github.com/vim/vim/commit/288ed23e3929ff55a8ae30db0ba3f57b6f119dc8 Author: zeertzjq <zeertzjq@outlook.com> Date: Mon Jul 4 11:03:07 2022 +0100 patch 9.0.0034: spell tests do not always clear the word list Problem: Spell tests do not always clear the word list. Solution: Clear the word list in TearDown(). (closes https://github.com/vim/vim/issues/10659)
author Bram Moolenaar <Bram@vim.org>
date Mon, 04 Jul 2022 12:15:02 +0200
parents f4ff490d51a7
children 5b7b5b372e2d
line wrap: on
line diff
--- a/src/testdir/test_spell.vim
+++ b/src/testdir/test_spell.vim
@@ -14,6 +14,8 @@ func TearDown()
   call delete('Xtest.latin1.add.spl')
   call delete('Xtest.latin1.spl')
   call delete('Xtest.latin1.sug')
+  " set 'encoding' to clear the word list
+  set encoding=utf-8
 endfunc
 
 func Test_wrap_search()
@@ -781,6 +783,10 @@ func Test_zz_sal_and_addition()
   set spl=Xtest_ca.latin1.spl
   call assert_equal("elequint", FirstSpellWord())
   call assert_equal("elekwint", SecondSpellWord())
+
+  bwipe!
+  set spellfile=
+  set spl&
 endfunc
 
 func Test_spellfile_value()
@@ -864,9 +870,6 @@ func Test_spell_good_word_invalid()
   sil! norm z=
 
   bwipe!
-  " clear the internal word list
-  set enc=latin1
-  set enc=utf-8
 endfunc
 
 func LoadAffAndDic(aff_contents, dic_contents)