aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-08-20 17:43:13 +0200
committerGitHub <noreply@github.com>2019-08-20 17:43:13 +0200
commit7ed21226224276627f43178ebfe6a3a0330006c8 (patch)
tree237091e75b9c9961a7e2628a48d2a77ca1b60eac
parent57e19ea846ac2821e308029b4569cffa0a1fd41f (diff)
downloadrneovim-7ed21226224276627f43178ebfe6a3a0330006c8.tar.gz
rneovim-7ed21226224276627f43178ebfe6a3a0330006c8.tar.bz2
rneovim-7ed21226224276627f43178ebfe6a3a0330006c8.zip
test/functional/ui/mode_spec: improve "ui mode_change event" (#10816)
Set a shorter `&matchtime` (instead of asserting the default), and do not sleep - `screen:expect` will do that (wait for it).
-rw-r--r--test/functional/ui/mode_spec.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/functional/ui/mode_spec.lua b/test/functional/ui/mode_spec.lua
index f6b3c1c3c9..a09df075aa 100644
--- a/test/functional/ui/mode_spec.lua
+++ b/test/functional/ui/mode_spec.lua
@@ -2,8 +2,7 @@ local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen')
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
-local command, eval = helpers.command, helpers.eval
-local eq = helpers.eq
+local command = helpers.command
describe('ui mode_change event', function()
local screen
@@ -63,7 +62,7 @@ describe('ui mode_change event', function()
]], mode="normal"}
command("set showmatch")
- eq(eval('&matchtime'), 5) -- tenths of seconds
+ command("set matchtime=1") -- tenths of seconds
feed('a(stuff')
screen:expect{grid=[[
word(stuff^ |
@@ -80,7 +79,6 @@ describe('ui mode_change event', function()
{2:-- INSERT --} |
]], mode="showmatch"}
- screen:sleep(400)
screen:expect{grid=[[
word(stuff)^ |
{0:~ }|