Mercurial > vim
changeset 12475:827ad6758d33 v8.0.1117
patch 8.0.1117: Test_terminal_no_cmd hangs on MS-Windows with GUI
commit https://github.com/vim/vim/commit/e738a1a033cd31cd2568ba99a9e2dca1e65b45ea
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 16 17:42:41 2017 +0200
patch 8.0.1117: Test_terminal_no_cmd hangs on MS-Windows with GUI
Problem: Test_terminal_no_cmd hangs on MS-Windows with GUI. (Christian
Brabandt)
Solution: Run the command with "start" and wait for the text to appear.
(micbou, closes #2096)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 16 Sep 2017 17:45:05 +0200 |
parents | 6d968a4c1c9c |
children | 2516383741e6 |
files | src/testdir/test_terminal.vim src/version.c |
diffstat | 2 files changed, 6 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -547,17 +547,14 @@ func Test_terminal_no_cmd() let pty = job_info(term_getjob(buf))['tty_out'] call assert_notequal('', pty) if has('win32') - silent exe '!cmd /c "echo look here > ' . pty . '"' + silent exe '!start cmd /c "echo look here > ' . pty . '"' else call system('echo "look here" > ' . pty) endif - call term_wait(buf) + let g:buf = buf + call WaitFor('term_getline(g:buf, 1) =~ "look here"') - let result = term_getline(buf, 1) - if has('win32') - let result = substitute(result, '\s\+$', '', '') - endif - call assert_equal('look here', result) + call assert_match('look here', term_getline(buf, 1)) bwipe! endfunc