Mercurial > vim
diff src/testdir/test_ex_mode.vim @ 19536:bab20768e1fd v8.2.0325
patch 8.2.0325: ex_getln.c code not covered by tests
Commit: https://github.com/vim/vim/commit/578fe947e3ad0cc7313c798cf76cc43dbf9b4ea6
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Feb 27 21:32:51 2020 +0100
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 https://github.com/vim/vim/issues/5702)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 27 Feb 2020 21:45:04 +0100 |
parents | cb73f4ae6b7c |
children | 43c04edcafec |
line wrap: on
line diff
--- a/src/testdir/test_ex_mode.vim +++ b/src/testdir/test_ex_mode.vim @@ -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