Bram Moolenaar | 5b5adf5 | 2017-09-09 18:16:43 +0200 | [diff] [blame] | 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 | |
Bram Moolenaar | b46fecd | 2019-06-15 17:58:09 +0200 | [diff] [blame] | 5 | source check.vim |
| 6 | CheckFeature terminal |
Bram Moolenaar | 5b5adf5 | 2017-09-09 18:16:43 +0200 | [diff] [blame] | 7 | |
| 8 | source shared.vim |
| 9 | |
| 10 | func Test_terminal_redir_fails() |
| 11 | if has('unix') |
| 12 | let buf = term_start('xyzabc', {'err_io': 'file', 'err_name': 'Xfile'}) |
Bram Moolenaar | 6a2c5a7 | 2020-04-08 21:50:25 +0200 | [diff] [blame^] | 13 | call TermWait(buf) |
Bram Moolenaar | 5b5adf5 | 2017-09-09 18:16:43 +0200 | [diff] [blame] | 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 |
| 20 | endfunc |