summaryrefslogtreecommitdiff
path: root/server/test/definition
diff options
context:
space:
mode:
Diffstat (limited to 'server/test/definition')
-rw-r--r--server/test/definition/init.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/test/definition/init.lua b/server/test/definition/init.lua
index 7d4549a1..435ab2f8 100644
--- a/server/test/definition/init.lua
+++ b/server/test/definition/init.lua
@@ -45,10 +45,11 @@ function TEST(script)
local new_script = script:gsub('<[!?]', ' '):gsub('[!?]>', ' ')
local ast, err = parser:ast(new_script)
assert(ast)
+ local results = matcher.compile(ast)
+ assert(results)
- local suc, result = matcher.definition(ast, pos)
- if suc then
- assert(suc)
+ local result = matcher.definition(results, pos)
+ if result then
assert(founded(target, result))
else
assert(#target == 0)