aboutsummaryrefslogtreecommitdiffstats
path: root/tests/query/injection_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tests/query/injection_spec.lua')
-rw-r--r--tests/query/injection_spec.lua9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/query/injection_spec.lua b/tests/query/injection_spec.lua
index 91096fee4..e90925e20 100644
--- a/tests/query/injection_spec.lua
+++ b/tests/query/injection_spec.lua
@@ -26,7 +26,6 @@ local function check_assertions(file)
)
local parser = ts.get_parser(buf, lang)
- local self = parser
local top_level_root = parser:parse(true)[1]:root()
for _, assertion in ipairs(assertions) do
@@ -37,7 +36,7 @@ local function check_assertions(file)
assertion.expected_capture_name = neg_assert and assertion.expected_capture_name:sub(2)
or assertion.expected_capture_name
local found = false
- self:for_each_tree(function(tstree, tree)
+ parser:for_each_tree(function(tstree, tree)
if not tstree then
return
end
@@ -50,11 +49,11 @@ local function check_assertions(file)
if assertion.expected_capture_name == tree:lang() then
found = true
end
- end, true)
+ end)
if neg_assert then
assert.False(
found,
- 'Error in at '
+ 'Error in '
.. file
.. ':'
.. (row + 1)
@@ -67,7 +66,7 @@ local function check_assertions(file)
else
assert.True(
found,
- 'Error in at '
+ 'Error in '
.. file
.. ':'
.. (row + 1)