diff options
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r-- | test/functional/helpers.lua | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index e63c79ec80..fc6bf80d7e 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -1,8 +1,3 @@ -if jit then - -- Disable JIT because of random errors on Travis with OS X. - jit.off(true, true) -end - require('coxpcall') local Loop = require('nvim.loop') local MsgpackStream = require('nvim.msgpack_stream') @@ -234,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 @@ -289,5 +288,6 @@ return { curbuf = curbuf, curwin = curwin, curtab = curtab, - curbuf_contents = curbuf_contents + curbuf_contents = curbuf_contents, + wait = wait } |