mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
test: hoist buf_lines()
This commit is contained in:
@@ -559,6 +559,11 @@ function module.wait()
|
|||||||
session:request('nvim_eval', '1')
|
session:request('nvim_eval', '1')
|
||||||
end
|
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()
|
function module.curbuf_contents()
|
||||||
module.wait() -- Before inspecting the buffer, process all input.
|
module.wait() -- Before inspecting the buffer, process all input.
|
||||||
return table.concat(module.curbuf('get_lines', 0, -1, true), '\n')
|
return table.concat(module.curbuf('get_lines', 0, -1, true), '\n')
|
||||||
|
@@ -729,10 +729,6 @@ describe('LSP util', function()
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
local function buf_lines(bufnr)
|
|
||||||
return exec_lua("return vim.api.nvim_buf_get_lines((...), 0, -1, false)", bufnr)
|
|
||||||
end
|
|
||||||
|
|
||||||
describe('apply_edits', function()
|
describe('apply_edits', function()
|
||||||
it('should apply simple edits', function()
|
it('should apply simple edits', function()
|
||||||
local edits = {
|
local edits = {
|
||||||
|
Reference in New Issue
Block a user