aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/cmdline_spec.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2017-06-26 14:49:15 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2018-10-15 20:13:11 +0200
commitc8810a51a3a7ef1185b45c07d93f7e6769c5ab55 (patch)
tree55e62aa6c09a729c9c34bd5d4d4d40321f982376 /test/functional/ui/cmdline_spec.lua
parent8fd092f3ff15bf70f84ec0d716c5aaa2c7379fa1 (diff)
downloadrneovim-c8810a51a3a7ef1185b45c07d93f7e6769c5ab55.tar.gz
rneovim-c8810a51a3a7ef1185b45c07d93f7e6769c5ab55.tar.bz2
rneovim-c8810a51a3a7ef1185b45c07d93f7e6769c5ab55.zip
tests: improve robustness of immediate successes in screen tests
Diffstat (limited to 'test/functional/ui/cmdline_spec.lua')
-rw-r--r--test/functional/ui/cmdline_spec.lua11
1 files changed, 3 insertions, 8 deletions
diff --git a/test/functional/ui/cmdline_spec.lua b/test/functional/ui/cmdline_spec.lua
index af26a6d88f..e86414fe5f 100644
--- a/test/functional/ui/cmdline_spec.lua
+++ b/test/functional/ui/cmdline_spec.lua
@@ -253,9 +253,6 @@ local function test_cmdline(linegrid)
]], cmdline=expectation}
-- erase information, so we check if it is retransmitted
- -- TODO(bfredl): when we add a flag to screen:expect{}
- -- to explicitly check redraw!, it should also do this
- screen.cmdline = {}
command("redraw!")
screen:expect{grid=[[
^ |
@@ -263,7 +260,7 @@ local function test_cmdline(linegrid)
{1:~ }|
{1:~ }|
|
- ]], cmdline=expectation}
+ ]], cmdline=expectation, reset=true}
feed('<cr>')
@@ -323,7 +320,6 @@ local function test_cmdline(linegrid)
{{' line1'}},
}}
- screen.cmdline_block = {}
command("redraw!")
screen:expect{grid=[[
^ |
@@ -339,7 +335,7 @@ local function test_cmdline(linegrid)
}}, cmdline_block = {
{{'function Foo()'}},
{{' line1'}},
- }}
+ }, reset=true}
feed('endfunction<cr>')
screen:expect{grid=[[
@@ -415,7 +411,6 @@ local function test_cmdline(linegrid)
pos = 4,
}}}
- screen.cmdline = {}
command("redraw!")
screen:expect{grid=[[
|
@@ -427,7 +422,7 @@ local function test_cmdline(linegrid)
firstc = ":",
content = {{"yank"}},
pos = 4,
- }}}
+ }}, reset=true}
feed("<c-c>")
screen:expect{grid=[[