Bram Moolenaar | fc8aa6d | 2020-10-12 20:31:26 +0200 | [diff] [blame] | 1 | " Test for Vim9 script with failures, causing memory leaks to be reported. |
| 2 | " The leaks happen after a fork() and can be ignored. |
| 3 | |
| 4 | def Test_assignment() |
| 5 | if has('channel') |
| 6 | var chan1: channel |
| 7 | var job1: job |
| 8 | var job2: job = job_start('willfail') |
| 9 | endif |
| 10 | enddef |
Bram Moolenaar | f0e496a | 2021-12-01 12:41:31 +0000 | [diff] [blame] | 11 | |
| 12 | " Unclear why this test causes valgrind to report problems. |
| 13 | def Test_job_info_return_type() |
| 14 | if !has('job') |
| 15 | CheckFeature job |
| 16 | else |
| 17 | var job: job = job_start(&shell) |
| 18 | var jobs = job_info() |
| 19 | assert_equal('list<job>', typename(jobs)) |
| 20 | assert_equal('dict<any>', typename(job_info(jobs[0]))) |
| 21 | job_stop(job) |
| 22 | endif |
| 23 | enddef |
| 24 | |