aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/scrollback_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-07-23 12:46:56 +0800
committerGitHub <noreply@github.com>2023-07-23 12:46:56 +0800
commitce56ad2ba7c93c5053b657cd99642b375a944607 (patch)
tree3d077ead2b71c8f64ec2c9fee56541aa27d09d98 /test/functional/terminal/scrollback_spec.lua
parentf56c1848091bb64c63b5bc25ec74bcbd2f52bdde (diff)
downloadrneovim-ce56ad2ba7c93c5053b657cd99642b375a944607.tar.gz
rneovim-ce56ad2ba7c93c5053b657cd99642b375a944607.tar.bz2
rneovim-ce56ad2ba7c93c5053b657cd99642b375a944607.zip
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.
Diffstat (limited to 'test/functional/terminal/scrollback_spec.lua')
-rw-r--r--test/functional/terminal/scrollback_spec.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/functional/terminal/scrollback_spec.lua b/test/functional/terminal/scrollback_spec.lua
index 5d3e55d898..d20f5177b8 100644
--- a/test/functional/terminal/scrollback_spec.lua
+++ b/test/functional/terminal/scrollback_spec.lua
@@ -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 |