test: use integers for API Buffer/Window/Tabpage EXT types

This commit is contained in:
Lewis Russell
2024-01-16 13:26:21 +00:00
committed by Lewis Russell
parent 91dc04a5e1
commit 8f02ae82e2
25 changed files with 622 additions and 651 deletions

View File

@@ -733,7 +733,7 @@ describe('api/buf', function()
end)
it('set_lines on unloaded buffer #8659 #22670', function()
local bufnr = api.nvim_get_current_buf().id
local bufnr = api.nvim_get_current_buf()
lua_or_rpc.nvim_buf_set_lines(bufnr, 0, -1, false, { 'a', 'b', 'c' })
lua_or_rpc.nvim_buf_set_name(bufnr, 'set_lines')
finally(function()
@@ -2101,7 +2101,7 @@ describe('api/buf', function()
api.nvim_buf_set_lines(0, -1, -1, true, { 'a', 'bit of', 'text' })
eq(true, api.nvim_buf_set_mark(0, 'Z', 3, 2, {}))
eq({ 3, 2 }, api.nvim_buf_get_mark(0, 'Z'))
eq({ api.nvim_get_current_buf().id, 3, 3, 0 }, fn.getpos("'Z"))
eq({ api.nvim_get_current_buf(), 3, 3, 0 }, fn.getpos("'Z"))
end)
it('fails when invalid marks names are used', function()
eq(false, pcall(api.nvim_buf_set_mark, 0, '!', 1, 0, {}))