]> granicus.if.org Git - vim/commitdiff
patch 8.0.1117: Test_terminal_no_cmd hangs on MS-Windows with GUI v8.0.1117
authorBram Moolenaar <Bram@vim.org>
Sat, 16 Sep 2017 15:42:41 +0000 (17:42 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 16 Sep 2017 15:42:41 +0000 (17:42 +0200)
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)

src/testdir/test_terminal.vim
src/version.c

index 96edf41ca44dc9acfdb4db0f143f468bc37c1c03..a4031cedf178ffab8999e6da4674aaa41c70dae5 100644 (file)
@@ -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
 
index ba32ecbc5d5e805019a85405fa880ed88adb746b..20a81f9dd18713c71e8d0a9218bdb8a92f514bde 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1117,
 /**/
     1116,
 /**/