diff src/testdir/test_ex_mode.vim @ 19471:cb73f4ae6b7c v8.2.0293

patch 8.2.0293: various Ex commands not sufficiently tested Commit: https://github.com/vim/vim/commit/818fc9ad143911b2faa0d7cee86724aa70a02080 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Feb 21 17:54:45 2020 +0100 patch 8.2.0293: various Ex commands not sufficiently tested Problem: Various Ex commands not sufficiently tested. Solution: Add more test cases. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5673)
author Bram Moolenaar <Bram@vim.org>
date Fri, 21 Feb 2020 18:00:05 +0100
parents af9d5585cfbf
children bab20768e1fd
line wrap: on
line diff
--- a/src/testdir/test_ex_mode.vim
+++ b/src/testdir/test_ex_mode.vim
@@ -111,11 +111,14 @@ func Test_open_command()
   close!
 endfunc
 
-func Test_Ex_feedkeys()
-  " this doesn't do anything useful, just check it doesn't hang
+" Test for :g/pat/visual to run vi commands in Ex mode
+" This used to hang Vim before 8.2.0274.
+func Test_Ex_global()
   new
-  call setline(1, ["foo"])
-  call feedkeys("Qg/foo/visual\<CR>", "xt")
+  call setline(1, ['', 'foo', 'bar', 'foo', 'bar', 'foo'])
+  call feedkeys("Qg/bar/visual\<CR>$rxQ$ryQvisual\<CR>j", "xt")
+  call assert_equal('bax', getline(3))
+  call assert_equal('bay', getline(5))
   bwipe!
 endfunc