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 |
Bram Moolenaar | 8b63313 | 2020-03-20 18:20:51 +0100 | [diff] [blame] | 3 | " freed. Since the process exits right away it's not a real leak. |
Bram Moolenaar | 46c4d4a | 2016-08-05 19:31:57 +0200 | [diff] [blame] | 4 | |
Bram Moolenaar | 6d91bcb | 2020-08-12 18:50:36 +0200 | [diff] [blame] | 5 | source check.vim |
Bram Moolenaar | 46c4d4a | 2016-08-05 19:31:57 +0200 | [diff] [blame] | 6 | |
| 7 | func Test_job_start_fails() |
Bram Moolenaar | 6d91bcb | 2020-08-12 18:50:36 +0200 | [diff] [blame] | 8 | 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 Moolenaar | 46c4d4a | 2016-08-05 19:31:57 +0200 | [diff] [blame] | 14 | endif |
| 15 | endfunc |
Bram Moolenaar | 8b63313 | 2020-03-20 18:20:51 +0100 | [diff] [blame] | 16 | |
| 17 | " vim: shiftwidth=2 sts=2 expandtab |