# HG changeset patch # User Christian Brabandt # Date 1503150303 -7200 # Node ID f512c507b0617667f116cd8b3690acae75261023 # Parent b5146446134cc1d982b61aab0195c2117cc6d983 patch 8.0.0963: terminal test fails on MacOS commit https://github.com/vim/vim/commit/d21f8b54b24e08d1f2b7c6ae32a9bc75ac4fa9fc Author: Bram Moolenaar Date: Sat Aug 19 15:40:01 2017 +0200 patch 8.0.0963: terminal test fails on MacOS Problem: Terminal test fails on MacOS. (chdiza) Solution: Wait for the shell to echo the characters. (closes https://github.com/vim/vim/issues/1991) diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -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) . "\") + call term_sendkeys(g:buf, 'echo ' . repeat(c, 5000) . "\") endfor + call term_sendkeys(g:buf, "echo done\") + 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 diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -770,6 +770,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 963, +/**/ 962, /**/ 961,