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 5source check.vim 6CheckFeature terminal 7 8source shared.vim 9 10func Test_terminal_redir_fails() 11 if has('unix') 12 let buf = term_start('xyzabc', {'err_io': 'file', 'err_name': 'Xfile'}) 13 call term_wait(buf) 14 call WaitFor('len(readfile("Xfile")) > 0') 15 call assert_match('executing job failed', readfile('Xfile')[0]) 16 call WaitFor('!&modified') 17 call delete('Xfile') 18 bwipe 19 endif 20endfunc 21