mirror of
https://github.com/vim/vim.git
synced 2025-10-09 06:14:17 -04:00
patch 8.2.0342: some code in ex_getln.c not covered by tests
Problem: Some code in ex_getln.c not covered by tests. Solution: Add more tests. (Yegappan Lakshmanan, closes #5717)
This commit is contained in:
@@ -49,6 +49,8 @@ func Test_ex_mode()
|
||||
call assert_equal([' foo', ' foo'], Ex(" foo\<C-d>"), e)
|
||||
call assert_equal(['foo', ' foo0'], Ex(" foo0\<C-d>"), e)
|
||||
call assert_equal(['foo', ' foo^'], Ex(" foo^\<C-d>"), e)
|
||||
call assert_equal(['foo', 'foo'],
|
||||
\ Ex("\<BS>\<C-H>\<Del>foo"), e)
|
||||
endfor
|
||||
|
||||
set sw&
|
||||
@@ -128,4 +130,13 @@ func Test_Ex_escape_enter()
|
||||
call assert_equal("a\rb", l)
|
||||
endfunc
|
||||
|
||||
" Test for :append! command in Ex mode
|
||||
func Test_Ex_append()
|
||||
new
|
||||
call setline(1, "\t abc")
|
||||
call feedkeys("Qappend!\npqr\nxyz\n.\nvisual\n", 'xt')
|
||||
call assert_equal(["\t abc", "\t pqr", "\t xyz"], getline(1, '$'))
|
||||
close!
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
Reference in New Issue
Block a user