patch 9.0.1195: restoring KeyTyped when building statusline not tested

Problem:    Restoring KeyTyped when building statusline not tested.
Solution:   Add a test.  Clean up and fix other tests. (closes #11815)
diff --git a/src/testdir/test_window_cmd.vim b/src/testdir/test_window_cmd.vim
index 3e84189..a97ccba 100644
--- a/src/testdir/test_window_cmd.vim
+++ b/src/testdir/test_window_cmd.vim
@@ -1861,6 +1861,8 @@
 
   call term_sendkeys(buf, ":quit\<CR>Gt")
   call VerifyScreenDump(buf, 'Test_splitkeep_callback_4', {})
+
+  call StopVimInTerminal(buf)
 endfunc
 
 function Test_splitkeep_fold()
@@ -1891,6 +1893,8 @@
 
   call term_sendkeys(buf, ":wincmd k\<CR>:quit\<CR>")
   call VerifyScreenDump(buf, 'Test_splitkeep_fold_4', {})
+
+  call StopVimInTerminal(buf)
 endfunction
 
 function Test_splitkeep_status()
@@ -1909,6 +1913,8 @@
 
   call term_sendkeys(buf, ":call win_move_statusline(win, 1)\<CR>")
   call VerifyScreenDump(buf, 'Test_splitkeep_status_1', {})
+
+  call StopVimInTerminal(buf)
 endfunction
 
 function Test_new_help_window_on_error()