patch 9.0.1449: test for prompt buffer is flaky

Problem:    Test for prompt buffer is flaky.
Solution:   Use WaitForAssert() instead of TermWait(). (Ozaki Kiichi,
            closes #12247)
diff --git a/src/testdir/test_prompt_buffer.vim b/src/testdir/test_prompt_buffer.vim
index b81309c..d173731 100644
--- a/src/testdir/test_prompt_buffer.vim
+++ b/src/testdir/test_prompt_buffer.vim
@@ -282,20 +282,16 @@
   call TermWait(buf)
 
   call term_sendkeys(buf, "exit\<CR>")
-  call TermWait(buf)
-  call assert_notmatch('-- INSERT --', term_getline(buf, 10))
+  call WaitForAssert({-> assert_notmatch('-- INSERT --', term_getline(buf, 10))})
 
   call term_sendkeys(buf, ":call DoAppend()\<CR>")
-  call TermWait(buf)
-  call assert_notmatch('-- INSERT --', term_getline(buf, 10))
+  call WaitForAssert({-> assert_notmatch('-- INSERT --', term_getline(buf, 10))})
 
   call term_sendkeys(buf, "i")
-  call TermWait(buf)
-  call assert_match('-- INSERT --', term_getline(buf, 10))
+  call WaitForAssert({-> assert_match('-- INSERT --', term_getline(buf, 10))})
 
   call term_sendkeys(buf, "\<C-R>=DoAppend()\<CR>")
-  call TermWait(buf)
-  call assert_match('-- INSERT --', term_getline(buf, 10))
+  call WaitForAssert({-> assert_match('-- INSERT --', term_getline(buf, 10))})
 
   call term_sendkeys(buf, "\<Esc>")
   call StopVimInTerminal(buf)