forked from aniani/vim
patch 8.2.2534: missing test coverage
Problem: Missing test coverage.
Solution: Improve test coverage for completion with different encodings,
mapset(), and term function failures. (Dominique Pellé,
closes #7877)
This commit is contained in:
@@ -680,23 +680,26 @@ endfunc
|
|||||||
|
|
||||||
func Test_edit_CTRL_N()
|
func Test_edit_CTRL_N()
|
||||||
" Check keyword completion
|
" Check keyword completion
|
||||||
new
|
for e in ['latin1', 'utf-8']
|
||||||
set complete=.
|
exe 'set encoding=' .. e
|
||||||
call setline(1, ['INFER', 'loWER', '', '', ])
|
new
|
||||||
call cursor(3, 1)
|
set complete=.
|
||||||
call feedkeys("Ai\<c-n>\<cr>\<esc>", "tnix")
|
call setline(1, ['INFER', 'loWER', '', '', ])
|
||||||
call feedkeys("ILO\<c-n>\<cr>\<esc>", 'tnix')
|
call cursor(3, 1)
|
||||||
call assert_equal(['INFER', 'loWER', 'i', 'LO', '', ''], getline(1, '$'))
|
call feedkeys("Ai\<c-n>\<cr>\<esc>", "tnix")
|
||||||
%d
|
call feedkeys("ILO\<c-n>\<cr>\<esc>", 'tnix')
|
||||||
call setline(1, ['INFER', 'loWER', '', '', ])
|
call assert_equal(['INFER', 'loWER', 'i', 'LO', '', ''], getline(1, '$'), e)
|
||||||
call cursor(3, 1)
|
%d
|
||||||
set ignorecase infercase
|
call setline(1, ['INFER', 'loWER', '', '', ])
|
||||||
call feedkeys("Ii\<c-n>\<cr>\<esc>", "tnix")
|
call cursor(3, 1)
|
||||||
call feedkeys("ILO\<c-n>\<cr>\<esc>", 'tnix')
|
set ignorecase infercase
|
||||||
call assert_equal(['INFER', 'loWER', 'infer', 'LOWER', '', ''], getline(1, '$'))
|
call feedkeys("Ii\<c-n>\<cr>\<esc>", "tnix")
|
||||||
|
call feedkeys("ILO\<c-n>\<cr>\<esc>", 'tnix')
|
||||||
|
call assert_equal(['INFER', 'loWER', 'infer', 'LOWER', '', ''], getline(1, '$'), e)
|
||||||
|
|
||||||
set noignorecase noinfercase complete&
|
set noignorecase noinfercase complete&
|
||||||
bw!
|
bw!
|
||||||
|
endfor
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_edit_CTRL_O()
|
func Test_edit_CTRL_O()
|
||||||
|
|||||||
@@ -240,6 +240,8 @@ func Test_mapset()
|
|||||||
bwipe!
|
bwipe!
|
||||||
|
|
||||||
call assert_fails('call mapset([], v:false, {})', 'E730:')
|
call assert_fails('call mapset([], v:false, {})', 'E730:')
|
||||||
|
call assert_fails('call mapset("i", 0, "")', 'E716:')
|
||||||
|
call assert_fails('call mapset("i", 0, {})', 'E460:')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Check_ctrlb_map(d, check_alt)
|
func Check_ctrlb_map(d, check_alt)
|
||||||
|
|||||||
@@ -301,6 +301,11 @@ func Test_term_func_invalid_arg()
|
|||||||
call assert_fails('let p = term_getansicolors([])', 'E745:')
|
call assert_fails('let p = term_getansicolors([])', 'E745:')
|
||||||
call assert_fails('call term_setansicolors([], [])', 'E745:')
|
call assert_fails('call term_setansicolors([], [])', 'E745:')
|
||||||
endif
|
endif
|
||||||
|
let buf = term_start('echo')
|
||||||
|
call assert_fails('call term_setapi(' .. buf .. ', {})', 'E731:')
|
||||||
|
call assert_fails('call term_setkill(' .. buf .. ', {})', 'E731:')
|
||||||
|
call assert_fails('call term_setrestore(' .. buf .. ', {})', 'E731:')
|
||||||
|
exe buf . "bwipe!"
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Test for sending various special keycodes to a terminal
|
" Test for sending various special keycodes to a terminal
|
||||||
|
|||||||
@@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2534,
|
||||||
/**/
|
/**/
|
||||||
2533,
|
2533,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user