comparison src/testdir/test_terminal3.vim @ 21427:299cf1c2a37d v8.2.1264

patch 8.2.1264: terminal getwinpos() test is a bit flaky Commit: https://github.com/vim/vim/commit/420952175a652372affc78c0017d6049f20063c3 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jul 21 21:48:58 2020 +0200 patch 8.2.1264: terminal getwinpos() test is a bit flaky Problem: Terminal getwinpos() test is a bit flaky. Solution: Call getwinpos() a bit later.
author Bram Moolenaar <Bram@vim.org>
date Tue, 21 Jul 2020 22:00:06 +0200
parents 3e0d4782d0c6
children 8c6433359913
comparison
equal deleted inserted replaced
21426:bb6e617589d0 21427:299cf1c2a37d
525 " split, go to the bottom-right window 525 " split, go to the bottom-right window
526 split 526 split
527 wincmd j 527 wincmd j
528 set splitright 528 set splitright
529 529
530 call writefile([ 530 let buf = RunVimInTerminal('', {'cols': 60})
531 \ 'echo getwinpos()', 531 call TermWait(buf, 100)
532 \ ], 'XTest_getwinpos') 532 call term_sendkeys(buf, ":echo getwinpos(500)\<CR>")
533 let buf = RunVimInTerminal('-S XTest_getwinpos', {'cols': 60})
534 call TermWait(buf)
535 533
536 " Find the output of getwinpos() in the bottom line. 534 " Find the output of getwinpos() in the bottom line.
537 let rows = term_getsize(buf)[0] 535 let rows = term_getsize(buf)[0]
538 call WaitForAssert({-> assert_match('\[\d\+, \d\+\]', term_getline(buf, rows))}) 536 call WaitForAssert({-> assert_match('\[\d\+, \d\+\]', term_getline(buf, rows))})
539 let line = term_getline(buf, rows) 537 let line = term_getline(buf, rows)
555 call assert_inrange(yroot + 2, yroot + yoff, ypos) 553 call assert_inrange(yroot + 2, yroot + yoff, ypos)
556 554
557 call TermWait(buf) 555 call TermWait(buf)
558 call term_sendkeys(buf, ":q\<CR>") 556 call term_sendkeys(buf, ":q\<CR>")
559 call StopVimInTerminal(buf) 557 call StopVimInTerminal(buf)
560 call delete('XTest_getwinpos')
561 exe buf . 'bwipe!' 558 exe buf . 'bwipe!'
562 set splitright& 559 set splitright&
563 only! 560 only!
564 endfunc 561 endfunc
565 562