forked from aniani/vim
patch 8.2.0363: some Normal mode commands not tested
Problem: Some Normal mode commands not tested. Solution: Add more tests. (Yegappan Lakshmanan, closes #5746)
This commit is contained in:
@@ -265,6 +265,10 @@ func Test_edit_10()
|
||||
call cursor(1, 4)
|
||||
call feedkeys("A\<s-home>start\<esc>", 'txin')
|
||||
call assert_equal(['startdef', 'ghi'], getline(1, '$'))
|
||||
" start select mode again with gv
|
||||
set selectmode=cmd
|
||||
call feedkeys('gvabc', 'xt')
|
||||
call assert_equal('abctdef', getline(1))
|
||||
set selectmode= keymodel=
|
||||
bw!
|
||||
endfunc
|
||||
@@ -1263,6 +1267,16 @@ func Test_edit_forbidden()
|
||||
catch /^Vim\%((\a\+)\)\=:E117/ " catch E117: unknown function
|
||||
endtry
|
||||
au! InsertCharPre
|
||||
" Not allowed to enter ex mode when text is locked
|
||||
au InsertCharPre <buffer> :normal! gQ<CR>
|
||||
let caught_e523 = 0
|
||||
try
|
||||
call feedkeys("ix\<esc>", 'xt')
|
||||
catch /^Vim\%((\a\+)\)\=:E523/ " catch E523
|
||||
let caught_e523 = 1
|
||||
endtry
|
||||
call assert_equal(1, caught_e523)
|
||||
au! InsertCharPre
|
||||
" 3) edit when completion is shown
|
||||
fun! Complete(findstart, base)
|
||||
if a:findstart
|
||||
|
||||
Reference in New Issue
Block a user