1
0
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:
Bram Moolenaar
2021-02-20 19:21:36 +01:00
parent 5b5ae29bd3
commit a1070eae77
4 changed files with 28 additions and 16 deletions

View File

@@ -680,23 +680,26 @@ endfunc
func Test_edit_CTRL_N()
" Check keyword completion
new
set complete=.
call setline(1, ['INFER', 'loWER', '', '', ])
call cursor(3, 1)
call feedkeys("Ai\<c-n>\<cr>\<esc>", "tnix")
call feedkeys("ILO\<c-n>\<cr>\<esc>", 'tnix')
call assert_equal(['INFER', 'loWER', 'i', 'LO', '', ''], getline(1, '$'))
%d
call setline(1, ['INFER', 'loWER', '', '', ])
call cursor(3, 1)
set ignorecase infercase
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, '$'))
for e in ['latin1', 'utf-8']
exe 'set encoding=' .. e
new
set complete=.
call setline(1, ['INFER', 'loWER', '', '', ])
call cursor(3, 1)
call feedkeys("Ai\<c-n>\<cr>\<esc>", "tnix")
call feedkeys("ILO\<c-n>\<cr>\<esc>", 'tnix')
call assert_equal(['INFER', 'loWER', 'i', 'LO', '', ''], getline(1, '$'), e)
%d
call setline(1, ['INFER', 'loWER', '', '', ])
call cursor(3, 1)
set ignorecase infercase
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&
bw!
set noignorecase noinfercase complete&
bw!
endfor
endfunc
func Test_edit_CTRL_O()