patch 9.0.0307: :echomsg doesn't work properly with cmdheight=0

Problem:    :echomsg doesn't work properly with cmdheight=0.
Solution:   Improve scrolling and displaying.
diff --git a/src/testdir/test_messages.vim b/src/testdir/test_messages.vim
index f714478..8683adc 100644
--- a/src/testdir/test_messages.vim
+++ b/src/testdir/test_messages.vim
@@ -478,6 +478,13 @@
       set cmdheight=0
       set showmode
       call setline(1, 'some text')
+      func ShowMessages()
+        echomsg 'some text'
+        sleep 100m
+        echomsg 'some more text'
+        sleep 2500m
+        echomsg 'even more text'
+      endfunc
   END
   call writefile(lines, 'XtestCmdheight')
   let buf = RunVimInTerminal('-S XtestCmdheight', #{rows: 6})
@@ -501,6 +508,14 @@
   call term_sendkeys(buf, ":w XsomeText\<CR>")
   call VerifyScreenDump(buf, 'Test_cmdheight_zero_5', {})
 
+  call term_sendkeys(buf, ":call popup_clear()\<CR>")
+  call VerifyScreenDump(buf, 'Test_cmdheight_zero_6', {})
+
+  call term_sendkeys(buf, ":call ShowMessages()\<CR>")
+  call VerifyScreenDump(buf, 'Test_cmdheight_zero_7', {})
+  sleep 2
+  call VerifyScreenDump(buf, 'Test_cmdheight_zero_8', {})
+
   " clean up
   call StopVimInTerminal(buf)
   call delete('XtestCmdheight')