blob: 1751d1d5beffad32a2ea22b32313209be5d60e9c [file] [log] [blame]
Bram Moolenaar46c4d4a2016-08-05 19:31:57 +02001" This test is in a separate file, because it usually causes reports for memory
2" leaks under valgrind. That is because when fork/exec fails memory is not
Bram Moolenaar8b633132020-03-20 18:20:51 +01003" freed. Since the process exits right away it's not a real leak.
Bram Moolenaar46c4d4a2016-08-05 19:31:57 +02004
Bram Moolenaar6d91bcb2020-08-12 18:50:36 +02005source check.vim
Bram Moolenaar46c4d4a2016-08-05 19:31:57 +02006
7func Test_job_start_fails()
Bram Moolenaar6d91bcb2020-08-12 18:50:36 +02008 CheckFeature job
9 let job = job_start('axdfxsdf')
10 if has('unix')
11 call WaitForAssert({-> assert_equal("dead", job_status(job))})
12 else
13 call WaitForAssert({-> assert_equal("fail", job_status(job))})
Bram Moolenaar46c4d4a2016-08-05 19:31:57 +020014 endif
15endfunc
Bram Moolenaar8b633132020-03-20 18:20:51 +010016
17" vim: shiftwidth=2 sts=2 expandtab