Problem: Vim9: memory leaks reported in assign test.
Solution: Move the failing job_start() call to separate test files, it
causes false leak reports.
test_vim9_cmd \
test_vim9_disassemble \
test_vim9_expr \
+ test_vim9_fails \
test_vim9_func \
test_vim9_script
test_vim9_cmd.res \
test_vim9_disassemble.res \
test_vim9_expr.res \
+ test_vim9_fails.res \
test_vim9_func.res \
test_vim9_script.res
if has('channel')
var chan1: channel
var job1: job
- var job2: job = job_start('willfail')
+ # calling job_start() is in test_vim9_fails.vim, it causes leak reports
endif
if has('float')
var float1: float = 3.4
CheckDefFailure(['v:errmsg += "more"'], 'E1051:')
CheckDefFailure(['v:errmsg += 123'], 'E1012:')
- # this should not leak
- if 0
- var text =<< trim END
- some text
- END
- endif
+ var text =<< trim END
+ some text
+ END
enddef
def Test_extend_list()
--- /dev/null
+" Test for Vim9 script with failures, causing memory leaks to be reported.
+" The leaks happen after a fork() and can be ignored.
+
+def Test_assignment()
+ if has('channel')
+ var chan1: channel
+ var job1: job
+ var job2: job = job_start('willfail')
+ endif
+enddef
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1839,
/**/
1838,
/**/