vim-patch:8.0.0440: not enough test coverage in Insert mode

[Nvim note: test_override() omitted]

Problem:    Not enough test coverage in Insert mode.
Solution:   Add lots of tests.  Add test_override(). (Christian Brabandt,
            closes vim/vim#1521)
eb992cb90f
This commit is contained in:
Justin M. Keyes
2018-02-01 23:32:43 +01:00
parent b67ce84c45
commit c8356e1151
5 changed files with 1335 additions and 8 deletions

View File

@@ -376,7 +376,6 @@ MS-DOS support:
Test functions: Test functions:
test_alloc_fail() test_alloc_fail()
test_autochdir() test_autochdir()
test_disable_char_avail()
test_garbagecollect_now() test_garbagecollect_now()
test_null_channel() test_null_channel()
test_null_dict() test_null_dict()
@@ -384,6 +383,7 @@ Test functions:
test_null_list() test_null_list()
test_null_partial() test_null_partial()
test_null_string() test_null_string()
test_override()
test_settime() test_settime()
Other options: Other options:

View File

@@ -49,6 +49,7 @@ NEW_TESTS ?= \
test_command_count.res \ test_command_count.res \
test_cscope.res \ test_cscope.res \
test_digraph.res \ test_digraph.res \
test_edit.res \
test_diffmode.res \ test_diffmode.res \
test_farsi.res \ test_farsi.res \
test_filter_map.res \ test_filter_map.res \

View File

@@ -45,7 +45,7 @@ source setup.vim
" This also enables use of line continuation. " This also enables use of line continuation.
set viminfo+=nviminfo set viminfo+=nviminfo
" Use utf-8 or latin1 be default, instead of whatever the system default " Use utf-8 or latin1 by default, instead of whatever the system default
" happens to be. Individual tests can overrule this at the top of the file. " happens to be. Individual tests can overrule this at the top of the file.
if has('multi_byte') if has('multi_byte')
set encoding=utf-8 set encoding=utf-8

File diff suppressed because it is too large Load Diff

View File

@@ -3,13 +3,13 @@
set belloff=all set belloff=all
func Test_search_cmdline() func Test_search_cmdline()
" See test/functional/legacy/search_spec.lua " See test/functional/legacy/search_spec.lua
throw 'skipped: Nvim does not support test_disable_char_avail()' throw 'skipped: Nvim does not support test_override()'
if !exists('+incsearch') if !exists('+incsearch')
return return
endif endif
" need to disable char_avail, " need to disable char_avail,
" so that expansion of commandline works " so that expansion of commandline works
call test_disable_char_avail(1) call test_override("char_avail", 1)
new new
call setline(1, [' 1', ' 2 these', ' 3 the', ' 4 their', ' 5 there', ' 6 their', ' 7 the', ' 8 them', ' 9 these', ' 10 foobar']) call setline(1, [' 1', ' 2 these', ' 3 the', ' 4 their', ' 5 there', ' 6 their', ' 7 the', ' 8 them', ' 9 these', ' 10 foobar'])
" Test 1 " Test 1
@@ -196,19 +196,19 @@ func Test_search_cmdline()
call assert_equal(' 3 the', getline('.')) call assert_equal(' 3 the', getline('.'))
" clean up " clean up
call test_disable_char_avail(0) call test_override("char_avail", 0)
bw! bw!
endfunc endfunc
func Test_search_cmdline2() func Test_search_cmdline2()
" See test/functional/legacy/search_spec.lua " See test/functional/legacy/search_spec.lua
throw 'skipped: Nvim does not support test_disable_char_avail()' throw 'skipped: Nvim does not support test_override()'
if !exists('+incsearch') if !exists('+incsearch')
return return
endif endif
" need to disable char_avail, " need to disable char_avail,
" so that expansion of commandline works " so that expansion of commandline works
call test_disable_char_avail(1) call test_override("char_avail", 1)
new new
call setline(1, [' 1', ' 2 these', ' 3 the theother']) call setline(1, [' 1', ' 2 these', ' 3 the theother'])
" Test 1 " Test 1
@@ -270,7 +270,7 @@ func Test_search_cmdline2()
" clean up " clean up
set noincsearch set noincsearch
call test_disable_char_avail(0) call test_override("char_avail", 0)
bw! bw!
endfunc endfunc