Bram Moolenaar | 46c4d4a | 2016-08-05 19:31:57 +0200 | [diff] [blame] | 1 | " 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 |
| 3 | " freed. Since the process exists right away it's not a real leak. |
| 4 | |
| 5 | source shared.vim |
| 6 | |
| 7 | func Test_job_start_fails() |
| 8 | if has('job') |
Bram Moolenaar | ab8b1c1 | 2017-11-04 19:24:31 +0100 | [diff] [blame] | 9 | let job = job_start('axdfxsdf') |
Bram Moolenaar | 46c4d4a | 2016-08-05 19:31:57 +0200 | [diff] [blame] | 10 | if has('unix') |
Bram Moolenaar | 50182fa | 2018-04-28 21:34:40 +0200 | [diff] [blame^] | 11 | call WaitForAssert({-> assert_equal("dead", job_status(job))}) |
Bram Moolenaar | 46c4d4a | 2016-08-05 19:31:57 +0200 | [diff] [blame] | 12 | else |
Bram Moolenaar | 50182fa | 2018-04-28 21:34:40 +0200 | [diff] [blame^] | 13 | call WaitForAssert({-> assert_equal("fail", job_status(job))}) |
Bram Moolenaar | 46c4d4a | 2016-08-05 19:31:57 +0200 | [diff] [blame] | 14 | endif |
Bram Moolenaar | 46c4d4a | 2016-08-05 19:31:57 +0200 | [diff] [blame] | 15 | endif |
| 16 | endfunc |