patch 8.2.4401: map listing does not clear the rest of the command line

Problem:    Map listing does not clear the rest of the command line.
Solution:   Call msg_clear_eos(). (closes #5623, closes #5962)
diff --git a/src/testdir/test_mapping.vim b/src/testdir/test_mapping.vim
index e18927c..35db436 100644
--- a/src/testdir/test_mapping.vim
+++ b/src/testdir/test_mapping.vim
@@ -540,7 +540,6 @@
   END
   call writefile(lines, 'XtestExprMap')
   let buf = RunVimInTerminal('-S XtestExprMap', #{rows: 10})
-  call TermWait(buf)
   call term_sendkeys(buf, "\<C-B>")
   call VerifyScreenDump(buf, 'Test_map_expr_1', {})
 
@@ -549,6 +548,22 @@
   call delete('XtestExprMap')
 endfunc
 
+func Test_map_listing()
+  CheckScreendump
+
+  let lines =<< trim END
+      nmap a b
+  END
+  call writefile(lines, 'XtestMapList')
+  let buf = RunVimInTerminal('-S XtestMapList', #{rows: 6})
+  call term_sendkeys(buf, ":                      nmap a\<CR>")
+  call VerifyScreenDump(buf, 'Test_map_list_1', {})
+
+  " clean up
+  call StopVimInTerminal(buf)
+  call delete('XtestMapList')
+endfunc
+
 func Test_expr_map_error()
   CheckScreendump
 
@@ -565,7 +580,6 @@
   END
   call writefile(lines, 'XtestExprMap')
   let buf = RunVimInTerminal('-S XtestExprMap', #{rows: 10})
-  call TermWait(buf)
   call term_sendkeys(buf, "\<F2>")
   call TermWait(buf)
   call term_sendkeys(buf, "\<CR>")