diff src/testdir/test_ex_mode.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 02111977dd05
children af9d5585cfbf
line wrap: on
line diff
--- 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)