mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
test: reduce flakiness (#24443)
Avoid consecutive RPC requests involving :startinsert or :stopinsert, because consecutive RPC requests may be processed together, before the :startinsert or :stopinsert takes effect. Also change some feed_command() to command() to make tests faster.
This commit is contained in:
@ -2,7 +2,7 @@ local Screen = require('test.functional.ui.screen')
|
||||
local helpers = require('test.functional.helpers')(after_each)
|
||||
local thelpers = require('test.functional.terminal.helpers')
|
||||
local clear, eq, curbuf = helpers.clear, helpers.eq, helpers.curbuf
|
||||
local feed, testprg, feed_command = helpers.feed, helpers.testprg, helpers.feed_command
|
||||
local feed, testprg = helpers.feed, helpers.testprg
|
||||
local eval = helpers.eval
|
||||
local command = helpers.command
|
||||
local matches = helpers.matches
|
||||
@ -349,8 +349,7 @@ describe(':terminal prints more lines than the screen height and exits', functio
|
||||
clear()
|
||||
local screen = Screen.new(30, 7)
|
||||
screen:attach({rgb=false})
|
||||
feed_command(("call termopen(['%s', '10']) | startinsert"):format(testprg('tty-test')))
|
||||
poke_eventloop()
|
||||
command(("call termopen(['%s', '10']) | startinsert"):format(testprg('tty-test')))
|
||||
screen:expect([[
|
||||
line6 |
|
||||
line7 |
|
||||
|
Reference in New Issue
Block a user