diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-02-17 21:33:30 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-02-17 21:33:30 +0100 |
commit | bc2b71d44a0b90b6aeb3534a76912fccbe5577df (patch) | |
tree | a77a42312e3d84710013ca0ba0f919ab79867560 /src/testdir/test_ex_mode.vim | |
parent | b13af50f73dd89503c915f76fcf92be58789521a (diff) | |
download | vim-git-bc2b71d44a0b90b6aeb3534a76912fccbe5577df.tar.gz |
patch 8.2.0270: some code not covered by testsv8.2.0270
Problem: Some code not covered by tests.
Solution: Add test cases. (Yegappan Lakshmanan, closes #5649)
Diffstat (limited to 'src/testdir/test_ex_mode.vim')
-rw-r--r-- | src/testdir/test_ex_mode.vim | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/testdir/test_ex_mode.vim b/src/testdir/test_ex_mode.vim index 7861477c7..bf1010498 100644 --- a/src/testdir/test_ex_mode.vim +++ b/src/testdir/test_ex_mode.vim @@ -55,7 +55,7 @@ func Test_ex_mode() let &encoding = encoding_save endfunc -" Test subsittute confirmation prompt :%s/pat/str/c in Ex mode +" Test substitute confirmation prompt :%s/pat/str/c in Ex mode func Test_Ex_substitute() CheckRunVimInTerminal let buf = RunVimInTerminal('', {'rows': 6}) @@ -77,6 +77,11 @@ func Test_Ex_substitute() call term_sendkeys(buf, "q\<CR>") call WaitForAssert({-> assert_match(':', term_getline(buf, 6))}, 1000) + " Pressing enter in ex mode should print the current line + call term_sendkeys(buf, "\<CR>") + call WaitForAssert({-> assert_match(' 3 foo foo', + \ term_getline(buf, 5))}, 1000) + call term_sendkeys(buf, ":vi\<CR>") call WaitForAssert({-> assert_match('foo bar', term_getline(buf, 1))}, 1000) |