diff options
Diffstat (limited to 'test/functional/treesitter/parser_spec.lua')
-rw-r--r-- | test/functional/treesitter/parser_spec.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/functional/treesitter/parser_spec.lua b/test/functional/treesitter/parser_spec.lua index bc7a1958ce..24f395c1ef 100644 --- a/test/functional/treesitter/parser_spec.lua +++ b/test/functional/treesitter/parser_spec.lua @@ -563,7 +563,7 @@ end]] local function is_main(match, pattern, bufnr, predicate) local nodes = match[ predicate[2] ] for _, node in ipairs(nodes) do - if query.get_node_text(node, bufnr) == 'main' then + if vim.treesitter.get_node_text(node, bufnr) == 'main' then return true end end @@ -602,7 +602,7 @@ end]] local function is_main(match, pattern, bufnr, predicate) local node = match[ predicate[2] ] - return query.get_node_text(node, bufnr) == 'main' + return vim.treesitter.get_node_text(node, bufnr) == 'main' end local parser = vim.treesitter.get_parser(0, "c") @@ -828,7 +828,7 @@ end]] return parser:included_regions() ]] - eq(range_tbl, { { { 0, 0, 0, 17, 1, 508 } } }) + eq({ { { 0, 0, 0, 17, 1, 508 } } }, range_tbl) end) it('allows to set complex ranges', function() @@ -1111,7 +1111,7 @@ int x = INT_MAX; return sub_tree == parser:children().c ]]) - eq(result, true) + eq(true, result) end) end) @@ -1135,7 +1135,7 @@ int x = INT_MAX; return result ]]) - eq(result, 'value') + eq('value', result) end) describe('when setting a key on a capture', function() @@ -1158,7 +1158,7 @@ int x = INT_MAX; end ]]) - eq(result, 'value') + eq('value', result) end) it('it should not overwrite the nested table', function() |