aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorRiley Bruins <ribru17@hotmail.com>2024-07-04 10:09:19 -0700
committerChristian Clason <c.clason@uni-graz.at>2024-07-05 10:11:48 +0200
commit9217e0d671b790d39192181cb894cfec012f06a6 (patch)
treea28628137ebc564b26f6000a57ba901bb4221ce6 /test/functional
parent2a883d9c597e70d25ffc53373731d05d18a89b91 (diff)
downloadrneovim-9217e0d671b790d39192181cb894cfec012f06a6.tar.gz
rneovim-9217e0d671b790d39192181cb894cfec012f06a6.tar.bz2
rneovim-9217e0d671b790d39192181cb894cfec012f06a6.zip
fix(treesitter): display fields for anonymous nodes in :InspectTree
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/treesitter/inspect_tree_spec.lua12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/functional/treesitter/inspect_tree_spec.lua b/test/functional/treesitter/inspect_tree_spec.lua
index b403cca735..ef2ed8d970 100644
--- a/test/functional/treesitter/inspect_tree_spec.lua
+++ b/test/functional/treesitter/inspect_tree_spec.lua
@@ -37,7 +37,7 @@ describe('vim.treesitter.inspect_tree', function()
it('can toggle to show anonymous nodes', function()
insert([[
- print()
+ print('hello')
]])
exec_lua([[
@@ -48,11 +48,15 @@ describe('vim.treesitter.inspect_tree', function()
expect_tree [[
(chunk ; [0, 0] - [2, 0]
- (function_call ; [0, 0] - [0, 7]
+ (function_call ; [0, 0] - [0, 14]
name: (identifier) ; [0, 0] - [0, 5]
- arguments: (arguments ; [0, 5] - [0, 7]
+ arguments: (arguments ; [0, 5] - [0, 14]
"(" ; [0, 5] - [0, 6]
- ")"))) ; [0, 6] - [0, 7]
+ (string ; [0, 6] - [0, 13]
+ start: "'" ; [0, 6] - [0, 7]
+ content: (string_content) ; [0, 7] - [0, 12]
+ end: "'") ; [0, 12] - [0, 13]
+ ")"))) ; [0, 13] - [0, 14]
]]
end)