From 8c8681d594a10c7056d62d09267190b6fab37e85 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Wed, 8 Jan 2020 09:32:49 -0800 Subject: test: hoist buf_lines() --- test/functional/helpers.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/functional/helpers.lua') diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index 0fdfcd70ba..e0012c6ced 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -559,6 +559,11 @@ function module.wait() session:request('nvim_eval', '1') end +function module.buf_lines(bufnr) + return module.exec_lua("return vim.api.nvim_buf_get_lines((...), 0, -1, false)", bufnr) +end + +--@see buf_lines() function module.curbuf_contents() module.wait() -- Before inspecting the buffer, process all input. return table.concat(module.curbuf('get_lines', 0, -1, true), '\n') -- cgit