aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2015-02-16 23:42:25 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2015-02-16 23:42:25 -0300
commit0429857689ba98356bc80d01ebd540fe861e8db2 (patch)
treeb4d039dba9e18a041b00cfe31d954931a97241dd /test/functional/helpers.lua
parentaf46564dd6e7e709f269f041f749dc312d9c3773 (diff)
parent40b7990553997d9eabb21b746346356016b373c5 (diff)
downloadrneovim-0429857689ba98356bc80d01ebd540fe861e8db2.tar.gz
rneovim-0429857689ba98356bc80d01ebd540fe861e8db2.tar.bz2
rneovim-0429857689ba98356bc80d01ebd540fe861e8db2.zip
Merge PR #1820 'Reimplement builtin terminal UI with termkey/unibilium'
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index ea98ff4ce3..fc6bf80d7e 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -229,11 +229,15 @@ local function curbuf(method, ...)
return buffer(method, buf, ...)
end
+local function wait()
+ session:request('vim_eval', '1')
+end
+
local function curbuf_contents()
-- Before inspecting the buffer, execute 'vim_eval' to wait until all
-- previously sent keys are processed(vim_eval is a deferred function, and
-- only processed after all input)
- session:request('vim_eval', '1')
+ wait()
return table.concat(curbuf('get_line_slice', 0, -1, true, true), '\n')
end
@@ -284,5 +288,6 @@ return {
curbuf = curbuf,
curwin = curwin,
curtab = curtab,
- curbuf_contents = curbuf_contents
+ curbuf_contents = curbuf_contents,
+ wait = wait
}