comparison src/testdir/test_popupwin.vim @ 19954:c087099e9163 v8.2.0533

patch 8.2.0533: tests using term_wait() can still be flaky Commit: https://github.com/vim/vim/commit/6a2c5a7dd5c9215cc030d5ea6e4616d782c091dd Author: Bram Moolenaar <Bram@vim.org> Date: Wed Apr 8 21:50:25 2020 +0200 patch 8.2.0533: tests using term_wait() can still be flaky Problem: Tests using term_wait() can still be flaky. Solution: Increase the wait time when rerunning a test. (James McCoy, closes #5899) Halve the initial times to make tests run faster when there is no rerun.
author Bram Moolenaar <Bram@vim.org>
date Wed, 08 Apr 2020 22:00:05 +0200
parents e292acf16e26
children 16460964c304
comparison
equal deleted inserted replaced
19953:313ad6f6fdb5 19954:c087099e9163
63 call term_sendkeys(buf, ":\<CR>") 63 call term_sendkeys(buf, ":\<CR>")
64 call VerifyScreenDump(buf, 'Test_popupwin_07', {}) 64 call VerifyScreenDump(buf, 'Test_popupwin_07', {})
65 65
66 " clear all popups after moving the cursor a bit, so that ruler is updated 66 " clear all popups after moving the cursor a bit, so that ruler is updated
67 call term_sendkeys(buf, "axxx\<Esc>") 67 call term_sendkeys(buf, "axxx\<Esc>")
68 call term_wait(buf) 68 call TermWait(buf)
69 call term_sendkeys(buf, "0") 69 call term_sendkeys(buf, "0")
70 call term_wait(buf) 70 call TermWait(buf)
71 call term_sendkeys(buf, ":call popup_clear()\<CR>") 71 call term_sendkeys(buf, ":call popup_clear()\<CR>")
72 call VerifyScreenDump(buf, 'Test_popupwin_08', {}) 72 call VerifyScreenDump(buf, 'Test_popupwin_08', {})
73 73
74 " clean up 74 " clean up
75 call StopVimInTerminal(buf) 75 call StopVimInTerminal(buf)
1387 call feedkeys("\<F5>\<MouseMove>\<Ignore>", "xt") 1387 call feedkeys("\<F5>\<MouseMove>\<Ignore>", "xt")
1388 endfunc 1388 endfunc
1389 END 1389 END
1390 call writefile(lines, 'XtestPopupBeval') 1390 call writefile(lines, 'XtestPopupBeval')
1391 let buf = RunVimInTerminal('-S XtestPopupBeval', #{rows: 10}) 1391 let buf = RunVimInTerminal('-S XtestPopupBeval', #{rows: 10})
1392 call term_wait(buf, 100) 1392 call TermWait(buf, 50)
1393 call term_sendkeys(buf, 'j') 1393 call term_sendkeys(buf, 'j')
1394 call term_sendkeys(buf, ":call Hover()\<CR>") 1394 call term_sendkeys(buf, ":call Hover()\<CR>")
1395 call VerifyScreenDump(buf, 'Test_popupwin_beval_1', {}) 1395 call VerifyScreenDump(buf, 'Test_popupwin_beval_1', {})
1396 1396
1397 call term_sendkeys(buf, ":call MoveOntoPopup()\<CR>") 1397 call term_sendkeys(buf, ":call MoveOntoPopup()\<CR>")
2956 let lines = Get_popupmenu_lines() 2956 let lines = Get_popupmenu_lines()
2957 call add(lines, 'set completepopup=height:4,highlight:InfoPopup') 2957 call add(lines, 'set completepopup=height:4,highlight:InfoPopup')
2958 call writefile(lines, 'XtestInfoPopup') 2958 call writefile(lines, 'XtestInfoPopup')
2959 2959
2960 let buf = RunVimInTerminal('-S XtestInfoPopup', #{rows: 14}) 2960 let buf = RunVimInTerminal('-S XtestInfoPopup', #{rows: 14})
2961 call term_wait(buf, 50) 2961 call TermWait(buf, 25)
2962 2962
2963 call term_sendkeys(buf, "A\<C-X>\<C-U>") 2963 call term_sendkeys(buf, "A\<C-X>\<C-U>")
2964 call VerifyScreenDump(buf, 'Test_popupwin_infopopup_1', {}) 2964 call VerifyScreenDump(buf, 'Test_popupwin_infopopup_1', {})
2965 2965
2966 call term_sendkeys(buf, "\<C-N>") 2966 call term_sendkeys(buf, "\<C-N>")
3004 let lines = Get_popupmenu_lines() 3004 let lines = Get_popupmenu_lines()
3005 call add(lines, 'set completepopup=height:4,border:off') 3005 call add(lines, 'set completepopup=height:4,border:off')
3006 call writefile(lines, 'XtestInfoPopupNb') 3006 call writefile(lines, 'XtestInfoPopupNb')
3007 3007
3008 let buf = RunVimInTerminal('-S XtestInfoPopupNb', #{rows: 14}) 3008 let buf = RunVimInTerminal('-S XtestInfoPopupNb', #{rows: 14})
3009 call term_wait(buf, 50) 3009 call TermWait(buf, 25)
3010 3010
3011 call term_sendkeys(buf, "A\<C-X>\<C-U>") 3011 call term_sendkeys(buf, "A\<C-X>\<C-U>")
3012 call VerifyScreenDump(buf, 'Test_popupwin_infopopup_nb_1', {}) 3012 call VerifyScreenDump(buf, 'Test_popupwin_infopopup_nb_1', {})
3013 3013
3014 call StopVimInTerminal(buf) 3014 call StopVimInTerminal(buf)
3022 let lines = Get_popupmenu_lines() 3022 let lines = Get_popupmenu_lines()
3023 call add(lines, 'set completepopup=height:4,border:off,align:menu') 3023 call add(lines, 'set completepopup=height:4,border:off,align:menu')
3024 call writefile(lines, 'XtestInfoPopupNb') 3024 call writefile(lines, 'XtestInfoPopupNb')
3025 3025
3026 let buf = RunVimInTerminal('-S XtestInfoPopupNb', #{rows: 14}) 3026 let buf = RunVimInTerminal('-S XtestInfoPopupNb', #{rows: 14})
3027 call term_wait(buf, 50) 3027 call TermWait(buf, 25)
3028 3028
3029 call term_sendkeys(buf, "A\<C-X>\<C-U>") 3029 call term_sendkeys(buf, "A\<C-X>\<C-U>")
3030 call term_sendkeys(buf, "\<C-N>") 3030 call term_sendkeys(buf, "\<C-N>")
3031 call term_sendkeys(buf, "\<C-N>") 3031 call term_sendkeys(buf, "\<C-N>")
3032 call term_sendkeys(buf, "\<C-N>") 3032 call term_sendkeys(buf, "\<C-N>")
3053 let lines = Get_popupmenu_lines() 3053 let lines = Get_popupmenu_lines()
3054 call add(lines, 'call InfoHidden()') 3054 call add(lines, 'call InfoHidden()')
3055 call writefile(lines, 'XtestInfoPopupHidden') 3055 call writefile(lines, 'XtestInfoPopupHidden')
3056 3056
3057 let buf = RunVimInTerminal('-S XtestInfoPopupHidden', #{rows: 14}) 3057 let buf = RunVimInTerminal('-S XtestInfoPopupHidden', #{rows: 14})
3058 call term_wait(buf, 50) 3058 call TermWait(buf, 25)
3059 3059
3060 call term_sendkeys(buf, "A\<C-X>\<C-U>") 3060 call term_sendkeys(buf, "A\<C-X>\<C-U>")
3061 call VerifyScreenDump(buf, 'Test_popupwin_infopopup_hidden_1', {}) 3061 call VerifyScreenDump(buf, 'Test_popupwin_infopopup_hidden_1', {})
3062 3062
3063 call term_sendkeys(buf, "\<C-N>") 3063 call term_sendkeys(buf, "\<C-N>")
3111 endfunc 3111 endfunc
3112 END 3112 END
3113 3113
3114 call writefile(lines, 'XtestInfoPopupWide') 3114 call writefile(lines, 'XtestInfoPopupWide')
3115 let buf = RunVimInTerminal('-S XtestInfoPopupWide', #{rows: 8}) 3115 let buf = RunVimInTerminal('-S XtestInfoPopupWide', #{rows: 8})
3116 call term_wait(buf, 50) 3116 call TermWait(buf, 25)
3117 3117
3118 call term_sendkeys(buf, "Ascr\<C-X>\<C-O>") 3118 call term_sendkeys(buf, "Ascr\<C-X>\<C-O>")
3119 call VerifyScreenDump(buf, 'Test_popupwin_infopopup_wide_1', {}) 3119 call VerifyScreenDump(buf, 'Test_popupwin_infopopup_wide_1', {})
3120 3120
3121 call term_sendkeys(buf, "\<Esc>") 3121 call term_sendkeys(buf, "\<Esc>")