]> granicus.if.org Git - vim/commitdiff
patch 8.0.0963: terminal test fails on MacOS v8.0.0963
authorBram Moolenaar <Bram@vim.org>
Sat, 19 Aug 2017 13:40:01 +0000 (15:40 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 19 Aug 2017 13:40:01 +0000 (15:40 +0200)
Problem:    Terminal test fails on MacOS. (chdiza)
Solution:   Wait for the shell to echo the characters. (closes #1991)

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

index 64104abebea09d5462eed3b5eeb2fb87e6b82ea5..e737aead9099a0a61465c4857782e5bb89ee308e 100644 (file)
@@ -452,14 +452,21 @@ func Test_terminal_list_args()
 endfunction
 
 func Test_terminal_noblock()
-  let buf = term_start(&shell)
+  let g:buf = term_start(&shell)
 
   for c in ['a','b','c','d','e','f','g','h','i','j','k']
-    call term_sendkeys(buf, 'echo ' . repeat(c, 5000) . "\<cr>")
+    call term_sendkeys(g:buf, 'echo ' . repeat(c, 5000) . "\<cr>")
   endfor
+  call term_sendkeys(g:buf, "echo done\<cr>")
+  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))
 
-  let g:job = term_getjob(buf)
-  call Stop_shell_in_terminal(buf)
-  call term_wait(buf)
+  let g:job = term_getjob(g:buf)
+  call Stop_shell_in_terminal(g:buf)
+  call term_wait(g:buf)
+  unlet g:buf
+  unlet g:job
+  unlet g:lnum
   bwipe
 endfunc
index 1ba0073b02aaaf03f1b1d7e70d8f281073c2a33e..e6626cb166f1498ef9409dd912b1c7461e5b5774 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    963,
 /**/
     962,
 /**/