blob: e430bfe4395f27a3e544b1361a3677e137d7c0c4 [file] [log] [blame]
Bram Moolenaar5b5adf52017-09-09 18:16:43 +02001" 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 Moolenaar6d91bcb2020-08-12 18:50:36 +02003" freed. Since the process exits right away it's not a real leak.
Bram Moolenaar5b5adf52017-09-09 18:16:43 +02004
Bram Moolenaarb46fecd2019-06-15 17:58:09 +02005source check.vim
6CheckFeature terminal
Bram Moolenaar5b5adf52017-09-09 18:16:43 +02007
8source shared.vim
9
10func Test_terminal_redir_fails()
Bram Moolenaar6d91bcb2020-08-12 18:50:36 +020011 CheckUnix
12
13 let buf = term_start('xyzabc', {'err_io': 'file', 'err_name': 'Xfile'})
14 call TermWait(buf)
15 call WaitFor('len(readfile("Xfile")) > 0')
16 call assert_match('executing job failed', readfile('Xfile')[0])
17 call WaitFor('!&modified')
18 call delete('Xfile')
19 bwipe
Bram Moolenaar5b5adf52017-09-09 18:16:43 +020020endfunc
Bram Moolenaar6d91bcb2020-08-12 18:50:36 +020021
22" vim: shiftwidth=2 sts=2 expandtab