Mercurial > vim
diff src/testdir/test_terminal.vim @ 13860:7f892e37b017 v8.0.1801
patch 8.0.1801: MS-Windows: redirecting terminal output does not work
commit https://github.com/vim/vim/commit/f25329cb94e481999e8b08d886cc0f0169e2020c
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 6 21:49:32 2018 +0200
patch 8.0.1801: MS-Windows: redirecting terminal output does not work
Problem: MS-Windows: redirecting terminal output does not work.
Solution: Intercept the text written to the terminal and write it to the
file.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 06 May 2018 22:00:07 +0200 |
parents | 8e583c52eb44 |
children | ea0e6c71ba51 |
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -675,18 +675,15 @@ func Test_terminal_wrong_options() endfunc func Test_terminal_redir_file() - " TODO: this should work on MS-Window - if has('unix') - let cmd = Get_cat_123_cmd() - let buf = term_start(cmd, {'out_io': 'file', 'out_name': 'Xfile'}) - call term_wait(buf) - call WaitForAssert({-> assert_notequal(0, len(readfile("Xfile")))}) - call assert_match('123', readfile('Xfile')[0]) - let g:job = term_getjob(buf) - call WaitForAssert({-> assert_equal("dead", job_status(g:job))}) - call delete('Xfile') - bwipe - endif + let cmd = Get_cat_123_cmd() + let buf = term_start(cmd, {'out_io': 'file', 'out_name': 'Xfile'}) + call term_wait(buf) + call WaitForAssert({-> assert_notequal(0, len(readfile("Xfile")))}) + call assert_match('123', readfile('Xfile')[0]) + let g:job = term_getjob(buf) + call WaitForAssert({-> assert_equal("dead", job_status(g:job))}) + call delete('Xfile') + bwipe if has('unix') call writefile(['one line'], 'Xfile')