To: vim_dev@googlegroups.com Subject: Patch 9.0.0034 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.0034 Problem: Spell tests do not always clear the word list. Solution: Clear the word list in TearDown(). (closes #10659) Files: src/testdir/test_spell.vim, src/testdir/test_spell_utf8.vim *** ../vim-9.0.0033/src/testdir/test_spell.vim 2022-07-01 22:26:16.691721005 +0100 --- src/testdir/test_spell.vim 2022-07-04 11:00:13.280220202 +0100 *************** *** 14,19 **** --- 14,21 ---- 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,786 **** --- 783,792 ---- 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,872 **** sil! norm z= bwipe! - " clear the internal word list - set enc=latin1 - set enc=utf-8 endfunc func LoadAffAndDic(aff_contents, dic_contents) --- 870,875 ---- *** ../vim-9.0.0033/src/testdir/test_spell_utf8.vim 2022-07-01 22:44:16.650379326 +0100 --- src/testdir/test_spell_utf8.vim 2022-07-04 11:00:13.280220202 +0100 *************** *** 13,18 **** --- 13,20 ---- 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,490 **** \ ] 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") --- 486,491 ---- *************** *** 759,764 **** --- 760,766 ---- call assert_equal("elequint", FirstSpellWord()) call assert_equal("elekwint", SecondSpellWord()) + bwipe! set spellfile= set spl& endfunc *************** *** 802,809 **** sil norm z= bwipe! - " clear the word list - set enc=utf-8 call delete('Xtmpfile') endfunc --- 804,809 ---- *************** *** 816,822 **** sil! norm P]svc norm P]s - " TODO: should we clear the word list? bwipe! endfunc --- 816,821 ---- *** ../vim-9.0.0033/src/version.c 2022-07-04 10:47:27.893116098 +0100 --- src/version.c 2022-07-04 11:01:20.212150491 +0100 *************** *** 737,738 **** --- 737,740 ---- { /* Add new patch number below this line */ + /**/ + 34, /**/ -- The future isn't what it used to be. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///