patch 8.2.2708: test sometimes fails waiting for shell in terminal
Problem: Test sometimes fails waiting for shell in terminal.
Solution: Use WaitForAssert() so we can see the actual job status. Use
Run_shell_in_terminal().
diff --git a/src/testdir/test_mksession.vim b/src/testdir/test_mksession.vim
index 29d4360..fca1227 100644
--- a/src/testdir/test_mksession.vim
+++ b/src/testdir/test_mksession.vim
@@ -392,7 +392,7 @@
func Test_mksession_terminal_no_restore_funcarg()
CheckFeature terminal
- call term_start(&shell, {'norestore': 1})
+ let buf = Run_shell_in_terminal({'norestore': 1})
mksession! Xtest_mks.out
let lines = readfile('Xtest_mks.out')
let term_cmd = ''
@@ -402,7 +402,7 @@
endif
endfor
- call StopShellInTerminal(bufnr('%'))
+ call StopShellInTerminal(buf)
call delete('Xtest_mks.out')
endfunc