" Test spell checking
" Note: this file uses latin1 encoding, but is used with utf-8 encoding.
source check.vim
CheckFeature spell
source screendump.vim
func TearDown()
set nospell
call delete('Xtest.aff')
call delete('Xtest.dic')
call delete('Xtest.latin1.add')
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()
new
call setline(1, ['The', '', 'A plong line with two zpelling mistakes', '', 'End'])
set spell wrapscan
normal ]s
call assert_equal('plong', expand('<cword>'))
normal ]s
call assert_equal('zpelling', expand('<cword>'))
normal ]s
call assert_equal('plong', expand('<cword>'))
bwipe!
set nospell
endfunc
func Test_curswant()