1
0
forked from aniani/vim

patch 8.2.0270: some code not covered by tests

Problem:    Some code not covered by tests.
Solution:   Add test cases. (Yegappan Lakshmanan, closes #5649)
This commit is contained in:
Bram Moolenaar
2020-02-17 21:33:30 +01:00
parent b13af50f73
commit bc2b71d44a
20 changed files with 466 additions and 7 deletions

View File

@@ -1500,6 +1500,22 @@ func Test_edit_startinsert()
bwipe!
endfunc
" Test for :startreplace and :startgreplace
func Test_edit_startreplace()
new
call setline(1, 'abc')
call feedkeys("l:startreplace\<CR>xyz\e", 'xt')
call assert_equal('axyz', getline(1))
call feedkeys("0:startreplace!\<CR>abc\e", 'xt')
call assert_equal('axyzabc', getline(1))
call setline(1, "a\tb")
call feedkeys("0l:startgreplace\<CR>xyz\e", 'xt')
call assert_equal("axyz\tb", getline(1))
call feedkeys("0i\<C-R>=execute('startreplace')\<CR>12\e", 'xt')
call assert_equal("12axyz\tb", getline(1))
close!
endfunc
func Test_edit_noesckeys()
CheckNotGui
new
@@ -1519,3 +1535,5 @@ func Test_edit_noesckeys()
bwipe!
set esckeys
endfunc
" vim: shiftwidth=2 sts=2 expandtab