aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_spell.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-04 18:38:00 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-07-04 18:38:39 +0800
commita4160dd1052b20f4ea33be46b5ed7d6dee31dba7 (patch)
tree2087ea58dbd46f6215e1e57f5ebe54416980af5d /src/nvim/testdir/test_spell.vim
parent08aba02ad7646e4a21ba3dfe63dbaf3c58f75406 (diff)
downloadrneovim-a4160dd1052b20f4ea33be46b5ed7d6dee31dba7.tar.gz
rneovim-a4160dd1052b20f4ea33be46b5ed7d6dee31dba7.tar.bz2
rneovim-a4160dd1052b20f4ea33be46b5ed7d6dee31dba7.zip
vim-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 vim/vim#10659) https://github.com/vim/vim/commit/288ed23e3929ff55a8ae30db0ba3f57b6f119dc8
Diffstat (limited to 'src/nvim/testdir/test_spell.vim')
-rw-r--r--src/nvim/testdir/test_spell.vim9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/nvim/testdir/test_spell.vim b/src/nvim/testdir/test_spell.vim
index f3aaf43100..1db0a01bd8 100644
--- a/src/nvim/testdir/test_spell.vim
+++ b/src/nvim/testdir/test_spell.vim
@@ -16,6 +16,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()
@@ -726,6 +728,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()
@@ -809,9 +815,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)