mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 08:28:34 +00:00
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)
288ed23e39
This commit is contained in:
@@ -16,6 +16,8 @@ func TearDown()
|
|||||||
call delete('Xtest.latin1.add.spl')
|
call delete('Xtest.latin1.add.spl')
|
||||||
call delete('Xtest.latin1.spl')
|
call delete('Xtest.latin1.spl')
|
||||||
call delete('Xtest.latin1.sug')
|
call delete('Xtest.latin1.sug')
|
||||||
|
" set 'encoding' to clear the word list
|
||||||
|
set encoding=utf-8
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_wrap_search()
|
func Test_wrap_search()
|
||||||
@@ -726,6 +728,10 @@ func Test_zz_sal_and_addition()
|
|||||||
set spl=Xtest_ca.latin1.spl
|
set spl=Xtest_ca.latin1.spl
|
||||||
call assert_equal("elequint", FirstSpellWord())
|
call assert_equal("elequint", FirstSpellWord())
|
||||||
call assert_equal("elekwint", SecondSpellWord())
|
call assert_equal("elekwint", SecondSpellWord())
|
||||||
|
|
||||||
|
bwipe!
|
||||||
|
set spellfile=
|
||||||
|
set spl&
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_spellfile_value()
|
func Test_spellfile_value()
|
||||||
@@ -809,9 +815,6 @@ func Test_spell_good_word_invalid()
|
|||||||
sil! norm z=
|
sil! norm z=
|
||||||
|
|
||||||
bwipe!
|
bwipe!
|
||||||
" clear the internal word list
|
|
||||||
" set enc=latin1
|
|
||||||
set enc=utf-8
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func LoadAffAndDic(aff_contents, dic_contents)
|
func LoadAffAndDic(aff_contents, dic_contents)
|
||||||
|
@@ -13,6 +13,8 @@ func TearDown()
|
|||||||
call delete('Xtest.utf-8.add.spl')
|
call delete('Xtest.utf-8.add.spl')
|
||||||
call delete('Xtest.utf-8.spl')
|
call delete('Xtest.utf-8.spl')
|
||||||
call delete('Xtest.utf-8.sug')
|
call delete('Xtest.utf-8.sug')
|
||||||
|
" set 'encoding' to clear the word list
|
||||||
|
set encoding=utf-8
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
let g:test_data_aff1 = [
|
let g:test_data_aff1 = [
|
||||||
@@ -484,7 +486,6 @@ let g:test_data_aff_sal = [
|
|||||||
\ ]
|
\ ]
|
||||||
|
|
||||||
func LoadAffAndDic(aff_contents, dic_contents)
|
func LoadAffAndDic(aff_contents, dic_contents)
|
||||||
set enc=utf-8
|
|
||||||
set spellfile=
|
set spellfile=
|
||||||
call writefile(a:aff_contents, "Xtest.aff")
|
call writefile(a:aff_contents, "Xtest.aff")
|
||||||
call writefile(a:dic_contents, "Xtest.dic")
|
call writefile(a:dic_contents, "Xtest.dic")
|
||||||
@@ -760,6 +761,7 @@ func Test_spell_sal_and_addition()
|
|||||||
call assert_equal("elequint", FirstSpellWord())
|
call assert_equal("elequint", FirstSpellWord())
|
||||||
call assert_equal("elekwint", SecondSpellWord())
|
call assert_equal("elekwint", SecondSpellWord())
|
||||||
|
|
||||||
|
bwipe!
|
||||||
set spellfile=
|
set spellfile=
|
||||||
set spl&
|
set spl&
|
||||||
endfunc
|
endfunc
|
||||||
@@ -803,8 +805,6 @@ func Test_word_index()
|
|||||||
sil norm z=
|
sil norm z=
|
||||||
|
|
||||||
bwipe!
|
bwipe!
|
||||||
" clear the word list
|
|
||||||
set enc=utf-8
|
|
||||||
call delete('Xtmpfile')
|
call delete('Xtmpfile')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
@@ -817,7 +817,6 @@ func Test_check_empty_line()
|
|||||||
sil! norm P]svc
|
sil! norm P]svc
|
||||||
norm P]s
|
norm P]s
|
||||||
|
|
||||||
" TODO: should we clear the word list?
|
|
||||||
bwipe!
|
bwipe!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user