]> granicus.if.org Git - vim/commitdiff
patch 8.0.0979: terminal noblock test fails on MS-Windows v8.0.0979
authorBram Moolenaar <Bram@vim.org>
Sun, 20 Aug 2017 18:21:23 +0000 (20:21 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 20 Aug 2017 18:21:23 +0000 (20:21 +0200)
Problem:    Terminal noblock test fails on MS-Windows. (Christian Brabandt)
Solution:   Ignore empty line below "done".

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

index b3868553e393f6740b3df1cfc3e66081585d8c4f..bdc5655d543d6cf8bd010193471b04fcd68aa36a 100644 (file)
@@ -458,9 +458,16 @@ func Test_terminal_noblock()
     call term_sendkeys(g:buf, 'echo ' . repeat(c, 5000) . "\<cr>")
   endfor
   call term_sendkeys(g:buf, "echo done\<cr>")
+
+  " On MS-Windows there is an extra empty line below "done".  Find "done" in
+  " the last-but-one or the last-but-two line.
   let g:lnum = term_getsize(g:buf)[0] - 1
-  call WaitFor('term_getline(g:buf, g:lnum) =~ "done"', 3000)
-  call assert_match('done', term_getline(g:buf, g:lnum))
+  call WaitFor('term_getline(g:buf, g:lnum) =~ "done" || term_getline(g:buf, g:lnum - 1) =~ "done"', 3000)
+  let line = term_getline(g:buf, g:lnum)
+  if line !~ 'done'
+    let line = term_getline(g:buf, g:lnum - 1)
+  endif
+  call assert_match('done', line)
 
   let g:job = term_getjob(g:buf)
   call Stop_shell_in_terminal(g:buf)
index 0488c199d39bee4b22cc6bb5f11d24523f2a0c67..5d97014c011613fcc3eaf007268c74624feeca40 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    979,
 /**/
     978,
 /**/