forked from aniani/vim
patch 8.2.1937: Vim9: test for confirm modifier fails in some situations
Problem: Vim9: test for confirm modifier fails in some situations. Solution: Add a short wait. Handle failure better.
This commit is contained in:
@@ -392,10 +392,14 @@ func Test_command_modifier_confirm()
|
||||
call term_sendkeys(buf, ":call Getout()\n")
|
||||
call WaitForAssert({-> assert_match('(Y)es, \[N\]o: ', term_getline(buf, 8))}, 1000)
|
||||
call term_sendkeys(buf, "y")
|
||||
call WaitForAssert({-> assert_match('(Y)es, \[N\]o: ', term_getline(buf, 8))}, 1000)
|
||||
call term_sendkeys(buf, "\<CR>")
|
||||
call TermWait(buf)
|
||||
call StopVimInTerminal(buf)
|
||||
|
||||
call assert_equal(['changed'], readfile('Xfile'))
|
||||
call delete('Xfile')
|
||||
call delete('.Xfile.swp') " in case Vim was killed
|
||||
call delete('Xconfirmscript')
|
||||
endfunc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user