mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
runtime: include en.utf-8.spl
Install en.utf-8.spl by default. - Allows spell-related tests to run. - Avoids download prompt for spelllang=en users
This commit is contained in:
parent
8eb0888a5d
commit
2b1bcd446b
@ -138,7 +138,7 @@ endforeach()
|
|||||||
file(GLOB_RECURSE RUNTIME_FILES
|
file(GLOB_RECURSE RUNTIME_FILES
|
||||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
rgb.txt
|
rgb.txt
|
||||||
*.vim *.lua *.dict *.py *.rb *.ps *.tutor *.tutor.json)
|
*.vim *.lua *.dict *.py *.rb *.ps *.spl *.tutor *.tutor.json)
|
||||||
|
|
||||||
foreach(F ${RUNTIME_FILES})
|
foreach(F ${RUNTIME_FILES})
|
||||||
get_filename_component(BASEDIR ${F} PATH)
|
get_filename_component(BASEDIR ${F} PATH)
|
||||||
|
BIN
runtime/spell/en.utf-8.spl
Normal file
BIN
runtime/spell/en.utf-8.spl
Normal file
Binary file not shown.
@ -1,5 +1,21 @@
|
|||||||
" Functions shared by several tests.
|
" Functions shared by several tests.
|
||||||
|
|
||||||
|
" {Nvim}
|
||||||
|
" Filepath captured from output may be truncated, like this:
|
||||||
|
" /home/va...estdir/Xtest-tmpdir/nvimxbXN4i/10
|
||||||
|
" Get last 2 segments, then combine with $TMPDIR.
|
||||||
|
func! Fix_truncated_tmpfile(fname)
|
||||||
|
" sanity check
|
||||||
|
if $TMPDIR ==# ''
|
||||||
|
throw '$TMPDIR is empty'
|
||||||
|
endif
|
||||||
|
if a:fname !~# $TMPDIR
|
||||||
|
throw '$TMPDIR not in fname: '.a:fname
|
||||||
|
endif
|
||||||
|
let last2segments = matchstr(a:fname, '[\/][^\/]\+[\/][^\/]\+$')
|
||||||
|
return $TMPDIR.last2segments
|
||||||
|
endfunc
|
||||||
|
|
||||||
" Get the name of the Python executable.
|
" Get the name of the Python executable.
|
||||||
" Also keeps it in s:python.
|
" Also keeps it in s:python.
|
||||||
func PythonProg()
|
func PythonProg()
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
" Test for various Normal mode commands
|
" Test for various Normal mode commands
|
||||||
|
|
||||||
|
source shared.vim
|
||||||
|
|
||||||
func! Setup_NewWindow()
|
func! Setup_NewWindow()
|
||||||
10new
|
10new
|
||||||
call setline(1, range(1,100))
|
call setline(1, range(1,100))
|
||||||
@ -1069,10 +1071,10 @@ func! Test_normal18_z_fold()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func! Test_normal19_z_spell()
|
func! Test_normal19_z_spell()
|
||||||
throw "skipped: Nvim 'spell' requires download"
|
|
||||||
if !has("spell") || !has('syntax')
|
if !has("spell") || !has('syntax')
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
" let $TMPDIR=fnamemodify($TMPDIR, ':.')
|
||||||
new
|
new
|
||||||
call append(0, ['1 good', '2 goood', '3 goood'])
|
call append(0, ['1 good', '2 goood', '3 goood'])
|
||||||
set spell spellfile=./Xspellfile.add spelllang=en
|
set spell spellfile=./Xspellfile.add spelllang=en
|
||||||
@ -1119,7 +1121,9 @@ func! Test_normal19_z_spell()
|
|||||||
" Test for zG
|
" Test for zG
|
||||||
let a=execute('unsilent norm! V$zG')
|
let a=execute('unsilent norm! V$zG')
|
||||||
call assert_match("Word '2 goood' added to .*", a)
|
call assert_match("Word '2 goood' added to .*", a)
|
||||||
|
set shortmess=
|
||||||
let fname=matchstr(a, 'to\s\+\zs\f\+$')
|
let fname=matchstr(a, 'to\s\+\zs\f\+$')
|
||||||
|
let fname=Fix_truncated_tmpfile(fname)
|
||||||
let cnt=readfile(fname)
|
let cnt=readfile(fname)
|
||||||
call assert_equal('2 goood', cnt[0])
|
call assert_equal('2 goood', cnt[0])
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
" Test spell checking
|
" Test spell checking
|
||||||
" TODO: move test58 tests here
|
" TODO: move test58 tests here
|
||||||
|
|
||||||
if v:true
|
if !has('spell')
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user