vim-patch:8.2.1498: on slow systems tests can be flaky (#39413)

Problem:    On slow systems tests can be flaky.
Solution:   Use TermWait() instead of term-wait(). (Yegappan Lakshmanan,
            closes vim/vim#6756)

https://github.com/vim/vim/commit/733d259a83bfdd3e1670cc1665e1bd56501799df

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjqandBram Moolenaar authored and GitHub committed 2026-04-25 23:03:40 +00:00
1 parent f8f95ee412
commit cdd5009824
3 files changed
+10 -10

No files matched your search

+3 -3
View File
@@ -513,13 +513,13 @@ func Test_entering_digraph()
CheckRunVimInTerminal
let buf = RunVimInTerminal('', {'rows': 6})
call term_sendkeys(buf, "i\<C-K>")
call term_wait(buf)
call TermWait(buf)
call assert_equal('?', term_getline(buf, 1))
call term_sendkeys(buf, "1")
call term_wait(buf)
call TermWait(buf)
call assert_equal('1', term_getline(buf, 1))
call term_sendkeys(buf, "2")
call term_wait(buf)
call TermWait(buf)
call assert_equal('½', term_getline(buf, 1))
call StopVimInTerminal(buf)
endfunc
+1 -1
View File
@@ -241,7 +241,7 @@ func Test_display_scroll_at_topline()
let buf = RunVimInTerminal('', #{cols: 20})
call term_sendkeys(buf, ":call setline(1, repeat('a', 21))\<CR>")
call term_wait(buf)
call TermWait(buf)
call term_sendkeys(buf, "O\<Esc>")
call VerifyScreenDump(buf, 'Test_display_scroll_at_topline', #{rows: 4})
+6 -6
View File
@@ -313,9 +313,9 @@ func Test_write_file_mtime()
call writefile(["Line1", "Line2"], 'Xfile')
let old_ftime = getftime('Xfile')
let buf = RunVimInTerminal('Xfile', #{rows : 10})
call term_wait(buf)
call TermWait(buf)
call term_sendkeys(buf, ":set noswapfile\<CR>")
call term_wait(buf)
call TermWait(buf)
" Modify the file directly. Make sure the file modification time is
" different. Note that on Linux/Unix, the file is considered modified
@@ -331,17 +331,17 @@ func Test_write_file_mtime()
" Try to overwrite the file and check for the prompt
call term_sendkeys(buf, ":w\<CR>")
call term_wait(buf)
call TermWait(buf)
call WaitForAssert({-> assert_equal("WARNING: The file has been changed since reading it!!!", term_getline(buf, 9))})
call assert_equal("Do you really want to write to it (y/n)?",
\ term_getline(buf, 10))
call term_sendkeys(buf, "n\<CR>")
call term_wait(buf)
call TermWait(buf)
call assert_equal(new_ftime, getftime('Xfile'))
call term_sendkeys(buf, ":w\<CR>")
call term_wait(buf)
call TermWait(buf)
call term_sendkeys(buf, "y\<CR>")
call term_wait(buf)
call TermWait(buf)
call WaitForAssert({-> assert_equal('Line2', readfile('Xfile')[1])})
" clean up