patch 7.4.1855
Problem: Valgrind reports memory leak for job that is not freed.
Solution: Free all jobs on exit. Add test for failing job.
diff --git a/src/testdir/test_partial.vim b/src/testdir/test_partial.vim
index af6ca6d..f33aab3 100644
--- a/src/testdir/test_partial.vim
+++ b/src/testdir/test_partial.vim
@@ -250,6 +250,20 @@
endif
endfunc
+func Test_job_start_fails()
+ if has('job')
+ let job = job_start('axdfxsdf')
+ for i in range(100)
+ if job_status(job) == 'dead'
+ break
+ endif
+ sleep 10m
+ endfor
+ call assert_equal('dead', job_status(job))
+ unlet job
+ endif
+endfunc
+
func Test_ref_job_partial_dict()
if has('job')
let g:ref_job = job_start('echo')