Mercurial > vim
comparison src/testdir/test_popupwin.vim @ 20395:8216bfb88709 v8.2.0752
patch 8.2.0752: terminal in popup window test is a bit flaky
Commit: https://github.com/vim/vim/commit/e06a28f5e30f439545ac125d54ffc4e6bd6daada
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed May 13 23:24:12 2020 +0200
patch 8.2.0752: terminal in popup window test is a bit flaky
Problem: Terminal in popup window test is a bit flaky.
Solution: Wait for shell job status to be "run". Mark as flaky test.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 13 May 2020 23:30:04 +0200 |
parents | 3b3589275ab9 |
children | 3fe45aa3bbc5 |
comparison
equal
deleted
inserted
replaced
20394:6f6494d0c60e | 20395:8216bfb88709 |
---|---|
2420 endfunc | 2420 endfunc |
2421 | 2421 |
2422 func Test_popupwin_terminal_buffer() | 2422 func Test_popupwin_terminal_buffer() |
2423 CheckFeature terminal | 2423 CheckFeature terminal |
2424 CheckUnix | 2424 CheckUnix |
2425 " Starting a terminal to run a shell in is considered flaky. | |
2426 let g:test_is_flaky = 1 | |
2425 | 2427 |
2426 let origwin = win_getid() | 2428 let origwin = win_getid() |
2427 let ptybuf = term_start(&shell, #{hidden: 1}) | 2429 let ptybuf = term_start(&shell, #{hidden: 1}) |
2428 let winid = popup_create(ptybuf, #{minwidth: 40, minheight: 10}) | 2430 let winid = popup_create(ptybuf, #{minwidth: 40, minheight: 10}) |
2429 " Wait for shell to start | 2431 " Wait for shell to start |
2430 sleep 200m | 2432 call WaitForAssert({-> assert_equal("run", job_status(term_getjob(ptybuf)))}) |
2433 sleep 100m | |
2431 " Check this doesn't crash | 2434 " Check this doesn't crash |
2432 call assert_equal(winnr(), winnr('j')) | 2435 call assert_equal(winnr(), winnr('j')) |
2433 call assert_equal(winnr(), winnr('k')) | 2436 call assert_equal(winnr(), winnr('k')) |
2434 call assert_equal(winnr(), winnr('h')) | 2437 call assert_equal(winnr(), winnr('h')) |
2435 call assert_equal(winnr(), winnr('l')) | 2438 call assert_equal(winnr(), winnr('l')) |