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 |
Bram Moolenaar | 6d91bcb | 2020-08-12 18:50:36 +0200 | [diff] [blame^] | 3 | " freed. Since the process exits right away it's not a real leak. |
Bram Moolenaar | 5b5adf5 | 2017-09-09 18:16:43 +0200 | [diff] [blame] | 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() |
Bram Moolenaar | 6d91bcb | 2020-08-12 18:50:36 +0200 | [diff] [blame^] | 11 | 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 Moolenaar | 5b5adf5 | 2017-09-09 18:16:43 +0200 | [diff] [blame] | 20 | endfunc |
Bram Moolenaar | 6d91bcb | 2020-08-12 18:50:36 +0200 | [diff] [blame^] | 21 | |
| 22 | " vim: shiftwidth=2 sts=2 expandtab |