Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
29382:289171b6aba3 | 29383:e76e18a20d9c |
---|---|
12 call delete('Xtest.dic') | 12 call delete('Xtest.dic') |
13 call delete('Xtest.latin1.add') | 13 call delete('Xtest.latin1.add') |
14 call delete('Xtest.latin1.add.spl') | 14 call delete('Xtest.latin1.add.spl') |
15 call delete('Xtest.latin1.spl') | 15 call delete('Xtest.latin1.spl') |
16 call delete('Xtest.latin1.sug') | 16 call delete('Xtest.latin1.sug') |
17 " set 'encoding' to clear the word list | |
18 set encoding=utf-8 | |
17 endfunc | 19 endfunc |
18 | 20 |
19 func Test_wrap_search() | 21 func Test_wrap_search() |
20 new | 22 new |
21 call setline(1, ['The', '', 'A plong line with two zpelling mistakes', '', 'End']) | 23 call setline(1, ['The', '', 'A plong line with two zpelling mistakes', '', 'End']) |
779 call assert_equal("elekwent", SecondSpellWord()) | 781 call assert_equal("elekwent", SecondSpellWord()) |
780 | 782 |
781 set spl=Xtest_ca.latin1.spl | 783 set spl=Xtest_ca.latin1.spl |
782 call assert_equal("elequint", FirstSpellWord()) | 784 call assert_equal("elequint", FirstSpellWord()) |
783 call assert_equal("elekwint", SecondSpellWord()) | 785 call assert_equal("elekwint", SecondSpellWord()) |
786 | |
787 bwipe! | |
788 set spellfile= | |
789 set spl& | |
784 endfunc | 790 endfunc |
785 | 791 |
786 func Test_spellfile_value() | 792 func Test_spellfile_value() |
787 set spellfile=Xdir/Xtest.latin1.add | 793 set spellfile=Xdir/Xtest.latin1.add |
788 set spellfile=Xdir/Xtest.utf-8.add,Xtest_other.add | 794 set spellfile=Xdir/Xtest.utf-8.add,Xtest_other.add |
862 2 | 868 2 |
863 sil! norm VzGprzzW | 869 sil! norm VzGprzzW |
864 sil! norm z= | 870 sil! norm z= |
865 | 871 |
866 bwipe! | 872 bwipe! |
867 " clear the internal word list | |
868 set enc=latin1 | |
869 set enc=utf-8 | |
870 endfunc | 873 endfunc |
871 | 874 |
872 func LoadAffAndDic(aff_contents, dic_contents) | 875 func LoadAffAndDic(aff_contents, dic_contents) |
873 set enc=latin1 | 876 set enc=latin1 |
874 set spellfile= | 877 set spellfile= |