From a080b2516d2ce2efb65ad0fd26126cdfa6f6e4f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 28 Dec 2018 15:36:56 +0800 Subject: matcher -> core --- server/test/document_symbol/init.lua | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'server/test/document_symbol/init.lua') diff --git a/server/test/document_symbol/init.lua b/server/test/document_symbol/init.lua index 5b1ed397..684e5449 100644 --- a/server/test/document_symbol/init.lua +++ b/server/test/document_symbol/init.lua @@ -1,5 +1,5 @@ local parser = require 'parser' -local matcher = require 'matcher' +local core = require 'core' local SymbolKind = { File = 1, @@ -63,9 +63,9 @@ end function TEST(script) return function (expect) local ast = parser:ast(script) - local vm = matcher.vm(ast) + local vm = core.vm(ast) assert(vm) - local result = matcher.documentSymbol(vm) + local result = core.documentSymbol(vm) assert(eq(expect, result)) end end @@ -83,3 +83,17 @@ end selectionRange = {16, 16}, } } + +TEST [[ +return function () +end +]] +{ + [1] = { + name = '', + detail = 'function f()', + kind = SymbolKind.Function, + range = {8, 22}, + selectionRange = {8, 8}, + } +} -- cgit v1.2.3