]> granicus.if.org Git - vim/commitdiff
patch 9.0.1222: terminal tests are flaky on MacOS v9.0.1222
authorYegappan Lakshmanan <yegappan@yahoo.com>
Thu, 19 Jan 2023 17:49:58 +0000 (17:49 +0000)
committerBram Moolenaar <Bram@vim.org>
Thu, 19 Jan 2023 17:49:58 +0000 (17:49 +0000)
Problem:    Terminal tests are flaky on MacOS.
Solution:   Add TermWait() calls. (Yegappan Lakshmanan, closes #11852)

src/testdir/test_terminal2.vim
src/testdir/test_terminal3.vim
src/version.c

index c6acb99bc359df26776a7daf914f40f46cd5fdc2..8615bf55ad48ff23c0b35898a96601537f95b106 100644 (file)
@@ -129,6 +129,7 @@ func Test_terminal_hidden_winsize()
   let cmd = GetDummyCmd()
   let rows = winheight(0)
   let buf = term_start(cmd, #{hidden: 1, term_rows: 10})
+  call TermWait(buf)
   call assert_equal(rows, winheight(0))
   call assert_equal([10, &columns], term_getsize(buf))
   exe "bwipe! " .. buf
@@ -196,6 +197,7 @@ func Test_terminal_out_err()
 
   let outfile = 'Xtermstdout'
   let buf = term_start(['./Xechoerrout.sh'], {'out_io': 'file', 'out_name': outfile})
+  call TermWait(buf)
 
   call WaitFor({-> !empty(readfile(outfile)) && !empty(term_getline(buf, 1))})
   call assert_equal(['this is standard out'], readfile(outfile))
@@ -216,6 +218,7 @@ func Test_termwinscroll()
   " will be dropped.
   exe 'set termwinscroll=' . &lines
   let buf = term_start('/bin/sh')
+  call TermWait(buf)
   for i in range(1, &lines)
     call feedkeys("echo " . i . "\<CR>", 'xt')
     call WaitForAssert({-> assert_match(string(i), term_getline(buf, term_getcursor(buf)[0] - 1))})
@@ -508,6 +511,7 @@ func Test_term_gettitle()
   endif
 
   let term = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile', '-c', 'set title'])
+  call TermWait(term)
   " When Vim is running as a server then the title ends in VIM{number}, thus
   " optionally match a number after "VIM".
   call WaitForAssert({-> assert_match('^\[No Name\] - VIM\d*$', term_gettitle(term)) })
index f23bfd2246778b2ce19769eed8e059fdfd6dbf11..96a9e63c131d3f2aa12d27a1c9fdd2e69ce0c3de 100644 (file)
@@ -18,6 +18,7 @@ func Test_terminal_altscreen()
   let cmd = "cat Xtext\<CR>"
 
   let buf = term_start(&shell, {})
+  call TermWait(buf)
   call writefile(["\<Esc>[?1047h"], 'Xtext', 'D')
   call term_sendkeys(buf, cmd)
   call WaitForAssert({-> assert_equal(1, term_getaltscreen(buf))})
index d94f43f9e189388c057cc51da4f6ab0f59ea3814..22a8e8b774d482fb216a9dcfc90c1ea2086d1d3c 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1222,
 /**/
     1221,
 /**/