diff src/testdir/test_channel.vim @ 22977:515d1651c6c6 v8.2.2035

patch 8.2.2035: MS-Windows: some tests may fail Commit: https://github.com/vim/vim/commit/f637bceb6135139dc1891a15de8fa134c2ca2d97 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Nov 23 18:14:56 2020 +0100 patch 8.2.2035: MS-Windows: some tests may fail Problem: MS-Windows: some tests may fail. Solution: Avoid test failures. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/7346)
author Bram Moolenaar <Bram@vim.org>
date Mon, 23 Nov 2020 18:30:04 +0100
parents dcb59b1cc0c1
children 73503bafb3bf
line wrap: on
line diff
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -2304,8 +2304,14 @@ endfunc
 func Test_cb_with_input()
   let g:wait_exit_cb = 1
 
-  call job_start('echo "Vim''s test"',
-        \ {'out_cb': 'ExitCb_cb_with_input'})
+  if has('win32')
+    let cmd = 'cmd /c echo "Vim''s test"'
+  else
+    let cmd = 'echo "Vim''s test"'
+  endif
+
+  let job = job_start(cmd, {'out_cb': 'ExitCb_cb_with_input'})
+  call WaitFor({-> job_status(job) == "dead"})
   call WaitForAssert({-> assert_equal(0, g:wait_exit_cb)})
 
   unlet g:wait_exit_cb