diff src/testdir/test_channel.vim @ 8502:ee5cb2e9ed5a v7.4.1541

commit https://github.com/vim/vim/commit/8950a563b306ce76f259573d91c2ddccdf52e32e Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 12 15:22:55 2016 +0100 patch 7.4.1541 Problem: Missing job_info(). Solution: Implement it.
author Christian Brabandt <cb@256bit.org>
date Sat, 12 Mar 2016 15:30:04 +0100
parents 1227dc21865b
children 0b31cc4b261e
line wrap: on
line diff
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -479,6 +479,12 @@ func Test_raw_pipe()
   finally
     call job_stop(job)
   endtry
+
+  let s:job = job
+  call s:waitFor('"dead" == job_status(s:job)')
+  let info = job_info(job)
+  call assert_equal("dead", info.status)
+  call assert_equal("term", info.stoponexit)
 endfunc
 
 func Test_nl_pipe()
@@ -1051,6 +1057,7 @@ endfunc
 function s:test_exit_callback(port)
   call job_setoptions(s:job, {'exit-cb': 'MyExitCb'})
   let s:exit_job = s:job
+  call assert_equal('MyExitCb', job_info(s:job)['exit-cb'])
 endfunc
 
 func Test_exit_callback()
@@ -1069,6 +1076,7 @@ func Test_exit_callback()
     endfor
 
     call assert_equal('done', s:job_exit_ret)
+    call assert_equal('dead', job_info(s:exit_job).status)
     unlet s:exit_job
   endif
 endfunc