0
0
mirror of https://github.com/vim/vim.git synced 2025-10-09 06:14:17 -04:00

patch 8.2.0325: ex_getln.c code not covered by tests

Problem:    Ex_getln.c code not covered by tests.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes #5702)
This commit is contained in:
Bram Moolenaar
2020-02-27 21:32:51 +01:00
parent 12f2003871
commit 578fe947e3
6 changed files with 200 additions and 3 deletions

View File

@@ -116,10 +116,16 @@ endfunc
func Test_Ex_global()
new
call setline(1, ['', 'foo', 'bar', 'foo', 'bar', 'foo'])
call feedkeys("Qg/bar/visual\<CR>$rxQ$ryQvisual\<CR>j", "xt")
call feedkeys("Q\<bs>g/bar/visual\<CR>$rxQ$ryQvisual\<CR>j", "xt")
call assert_equal('bax', getline(3))
call assert_equal('bay', getline(5))
bwipe!
endfunc
" In Ex-mode, a backslash escapes a newline
func Test_Ex_escape_enter()
call feedkeys("gQlet l = \"a\\\<kEnter>b\"\<cr>vi\<cr>", 'xt')
call assert_equal("a\rb", l)
endfunc
" vim: shiftwidth=2 sts=2 expandtab