Mercurial > vim
diff src/testdir/test_edit.vim @ 19425:67fbe280a502 v8.2.0270
patch 8.2.0270: some code not covered by tests
Commit: https://github.com/vim/vim/commit/bc2b71d44a0b90b6aeb3534a76912fccbe5577df
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Feb 17 21:33:30 2020 +0100
patch 8.2.0270: some code not covered by tests
Problem: Some code not covered by tests.
Solution: Add test cases. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5649)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 17 Feb 2020 21:45:04 +0100 |
parents | 2ef19eed524a |
children | 9c15be376631 |
line wrap: on
line diff
--- a/src/testdir/test_edit.vim +++ b/src/testdir/test_edit.vim @@ -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