mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
tests: fix deprecated tests (#4681)
This commit is contained in:
parent
481d1eda24
commit
eedc5198a1
1 changed files with 8 additions and 2 deletions
|
|
@ -71,8 +71,14 @@ describe("swap_nodes", function()
|
|||
local function swap(case)
|
||||
vim.api.nvim_buf_set_lines(0, 0, -1, false, case.lines)
|
||||
vim.opt.filetype = case.filetype
|
||||
local a = vim.treesitter.get_node_at_pos(0, case.a[1], case.a[2], {})
|
||||
local b = vim.treesitter.get_node_at_pos(0, case.b[1], case.b[2], {})
|
||||
local a = vim.treesitter.get_node {
|
||||
bufnr = 0,
|
||||
pos = { case.a[1], case.a[2] },
|
||||
}
|
||||
local b = vim.treesitter.get_node {
|
||||
bufnr = 0,
|
||||
pos = { case.b[1], case.b[2] },
|
||||
}
|
||||
tsutils.swap_nodes(a, b, 0, true)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue