blob: 5c3cab545e42ab0d950b2ccd1ddb9d061e54df53 [file] [log] [blame]
Bram Moolenaarfc8aa6d2020-10-12 20:31:26 +02001" Test for Vim9 script with failures, causing memory leaks to be reported.
2" The leaks happen after a fork() and can be ignored.
3
Bram Moolenaar853a7692021-12-04 15:00:23 +00004source check.vim
5
Bram Moolenaarfc8aa6d2020-10-12 20:31:26 +02006def Test_assignment()
Bram Moolenaar853a7692021-12-04 15:00:23 +00007 if !has('channel')
8 CheckFeature channel
9 else
Bram Moolenaarfc8aa6d2020-10-12 20:31:26 +020010 var chan1: channel
11 var job1: job
12 var job2: job = job_start('willfail')
13 endif
14enddef
Bram Moolenaarf0e496a2021-12-01 12:41:31 +000015
16" Unclear why this test causes valgrind to report problems.
17def Test_job_info_return_type()
18 if !has('job')
19 CheckFeature job
20 else
21 var job: job = job_start(&shell)
22 var jobs = job_info()
23 assert_equal('list<job>', typename(jobs))
24 assert_equal('dict<any>', typename(job_info(jobs[0])))
25 job_stop(job)
26 endif
27enddef
28