comparison src/testdir/test_popupwin.vim @ 20970:736d6e6f55f6 v8.2.1036

patch 8.2.1036: popupwin test fails sometimes Commit: https://github.com/vim/vim/commit/373c65104e0991724cb57910dfb3e5c276e2d7e7 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jun 22 19:24:23 2020 +0200 patch 8.2.1036: popupwin test fails sometimes Problem: Popupwin test fails sometimes. Solution: Use WaitForAssert() instead of a sleep.
author Bram Moolenaar <Bram@vim.org>
date Mon, 22 Jun 2020 19:30:04 +0200
parents a02ba6be5a84
children 769f5a2d0879
comparison
equal deleted inserted replaced
20969:23e89ca0b70f 20970:736d6e6f55f6
2452 let termbuf2 = term_start(&shell, #{hidden: 1}) 2452 let termbuf2 = term_start(&shell, #{hidden: 1})
2453 call assert_fails('call popup_create(termbuf2, #{})', 'E861:') 2453 call assert_fails('call popup_create(termbuf2, #{})', 'E861:')
2454 call term_sendkeys(termbuf2, "exit\<CR>") 2454 call term_sendkeys(termbuf2, "exit\<CR>")
2455 2455
2456 " Exiting shell closes popup window 2456 " Exiting shell closes popup window
2457 let pupwin = win_getid()
2457 call feedkeys("exit\<CR>", 'xt') 2458 call feedkeys("exit\<CR>", 'xt')
2458 " Wait for shell to exit 2459 " Wait for shell to exit
2459 sleep 100m 2460 call WaitForAssert({-> assert_notequal(pupwin, win_getid())})
2461
2460 call feedkeys(":quit\<CR>", 'xt') 2462 call feedkeys(":quit\<CR>", 'xt')
2461 call assert_equal(origwin, win_getid()) 2463 call assert_equal(origwin, win_getid())
2462 endfunc 2464 endfunc
2463 2465
2464 func Test_popupwin_close_prevwin() 2466 func Test_popupwin_close_prevwin()