patch 7.4.1380
Problem: The job exit callback is not implemented.
Solution: Add the "exit-cb" option.
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim
index 61ca9b7..2b4b189 100644
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -468,3 +468,28 @@
call ch_log('Test_call()')
call s:run_server('s:test_call')
endfunc
+
+"""""""""
+
+let s:job_ret = 'not yet'
+function MyExitCb(job, status)
+ let s:job_ret = 'done'
+endfunc
+
+function s:test_exit_callback(port)
+ call job_setoptions(s:job, {'exit-cb': 'MyExitCb'})
+ let s:exit_job = s:job
+endfunc
+
+func Test_exit_callback()
+ if has('job')
+ call s:run_server('s:test_exit_callback')
+
+ " the job may take a little while to exit
+ sleep 50m
+
+ " calling job_status() triggers the callback
+ call job_status(s:exit_job)
+ call assert_equal('done', s:job_ret)
+ endif
+endfunc