diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-07-04 11:03:07 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-07-04 11:03:07 +0100 |
commit | 288ed23e3929ff55a8ae30db0ba3f57b6f119dc8 (patch) | |
tree | 04bcea7f4c7694e7e2a2c8db7589b3d3e49b73ce /src | |
parent | 4dd9252d6f0e93c9118c808bd47f407d581947a8 (diff) |
patch 9.0.0034: spell tests do not always clear the word listv9.0.0034
Problem: Spell tests do not always clear the word list.
Solution: Clear the word list in TearDown(). (closes #10659)
Diffstat (limited to 'src')
-rw-r--r-- | src/testdir/test_spell.vim | 9 | ||||
-rw-r--r-- | src/testdir/test_spell_utf8.vim | 7 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 11 insertions, 7 deletions
diff --git a/src/testdir/test_spell.vim b/src/testdir/test_spell.vim index 0187a175a8..d3f56d8d14 100644 --- 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) diff --git a/src/testdir/test_spell_utf8.vim b/src/testdir/test_spell_utf8.vim index c71308be56..07cb87af6c 100644 --- a/src/testdir/test_spell_utf8.vim +++ b/src/testdir/test_spell_utf8.vim @@ -13,6 +13,8 @@ func TearDown() call delete('Xtest.utf-8.add.spl') call delete('Xtest.utf-8.spl') call delete('Xtest.utf-8.sug') + " set 'encoding' to clear the word list + set encoding=utf-8 endfunc let g:test_data_aff1 = [ @@ -484,7 +486,6 @@ let g:test_data_aff_sal = [ \ ] func LoadAffAndDic(aff_contents, dic_contents) - set enc=utf-8 set spellfile= call writefile(a:aff_contents, "Xtest.aff") call writefile(a:dic_contents, "Xtest.dic") @@ -759,6 +760,7 @@ func Test_spell_sal_and_addition() call assert_equal("elequint", FirstSpellWord()) call assert_equal("elekwint", SecondSpellWord()) + bwipe! set spellfile= set spl& endfunc @@ -802,8 +804,6 @@ func Test_word_index() sil norm z= bwipe! - " clear the word list - set enc=utf-8 call delete('Xtmpfile') endfunc @@ -816,7 +816,6 @@ func Test_check_empty_line() sil! norm P]svc norm P]s - " TODO: should we clear the word list? bwipe! endfunc diff --git a/src/version.c b/src/version.c index 419e25f6d3..180a4cf8c9 100644 --- a/src/version.c +++ b/src/version.c @@ -736,6 +736,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 34, +/**/ 33, /**/ 32, |