summaryrefslogtreecommitdiff
path: root/server/test/crossfile
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-28 15:36:56 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-28 15:36:56 +0800
commita080b2516d2ce2efb65ad0fd26126cdfa6f6e4f8 (patch)
treeb5672e03d11a43a56b63fe02d7b685eacd21ace4 /server/test/crossfile
parent549f6dd7ce8c733f9b51f5e93b3f14c1e2a44aca (diff)
downloadlua-language-server-a080b2516d2ce2efb65ad0fd26126cdfa6f6e4f8.zip
matcher -> core
Diffstat (limited to 'server/test/crossfile')
-rw-r--r--server/test/crossfile/completion.lua4
-rw-r--r--server/test/crossfile/definition.lua6
-rw-r--r--server/test/crossfile/hover.lua6
3 files changed, 8 insertions, 8 deletions
diff --git a/server/test/crossfile/completion.lua b/server/test/crossfile/completion.lua
index e35874b3..f136a057 100644
--- a/server/test/crossfile/completion.lua
+++ b/server/test/crossfile/completion.lua
@@ -1,7 +1,7 @@
local service = require 'service'
local workspace = require 'workspace'
local fs = require 'bee.filesystem'
-local matcher = require 'matcher'
+local core = require 'core'
rawset(_G, 'TEST', true)
@@ -86,7 +86,7 @@ function TEST(data)
local vm = lsp:loadVM(mainUri)
assert(vm)
- local result = matcher.completion(vm, pos)
+ local result = core.completion(vm, pos)
local expect = data.completion
if expect then
assert(result)
diff --git a/server/test/crossfile/definition.lua b/server/test/crossfile/definition.lua
index dfc91c31..8d8c7569 100644
--- a/server/test/crossfile/definition.lua
+++ b/server/test/crossfile/definition.lua
@@ -1,7 +1,7 @@
local service = require 'service'
local workspace = require 'workspace'
local fs = require 'bee.filesystem'
-local matcher = require 'matcher'
+local core = require 'core'
rawset(_G, 'TEST', true)
@@ -48,8 +48,8 @@ function TEST(data)
local sourceVM = lsp:getVM(sourceUri)
assert(sourceVM)
local sourcePos = (sourceList[1][1] + sourceList[1][2]) // 2
- local result = matcher.findResult(sourceVM, sourcePos)
- local positions = matcher.definition(sourceVM, result)
+ local result = core.findResult(sourceVM, sourcePos)
+ local positions = core.definition(sourceVM, result)
assert(positions and positions[1])
local start, finish, valueUri = positions[1][1], positions[1][2], positions[1][3]
assert(valueUri == targetUri)
diff --git a/server/test/crossfile/hover.lua b/server/test/crossfile/hover.lua
index 32fd7580..a4479280 100644
--- a/server/test/crossfile/hover.lua
+++ b/server/test/crossfile/hover.lua
@@ -1,7 +1,7 @@
local service = require 'service'
local workspace = require 'workspace'
local fs = require 'bee.filesystem'
-local matcher = require 'matcher'
+local core = require 'core'
rawset(_G, 'TEST', true)
@@ -72,8 +72,8 @@ function TEST(data)
local sourceVM = lsp:loadVM(sourceUri)
assert(sourceVM)
local sourcePos = (sourceList[1][1] + sourceList[1][2]) // 2
- local result, source = matcher.findResult(sourceVM, sourcePos)
- local hover = matcher.hover(result, source, lsp)
+ local result, source = core.findResult(sourceVM, sourcePos)
+ local hover = core.hover(result, source, lsp)
assert(hover)
if data.hover.description then
data.hover.description = data.hover.description:gsub('%$ROOT%$', ws:uriEncode(ROOT):gsub('%%', '%%%%'))