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 #5673)
diff --git a/src/testdir/test_ex_mode.vim b/src/testdir/test_ex_mode.vim
index 910c1a6..7869c76 100644
--- a/src/testdir/test_ex_mode.vim
+++ b/src/testdir/test_ex_mode.vim
@@ -111,11 +111,14 @@
   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