summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-08-28 21:16:13 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-08-28 21:16:13 +0800
commitbd1a684806a01702a46c05cb7c75d3b01f2fd242 (patch)
tree3291c175c8f02322952ccac2a3003984ecd73aa5 /server
parentcd32c1ad7a3fe49a229c5bc53a142f9c2d0fbc9a (diff)
downloadlua-language-server-bd1a684806a01702a46c05cb7c75d3b01f2fd242.zip
修正bug
Diffstat (limited to 'server')
-rw-r--r--server/src/uri.lua2
-rw-r--r--server/test.lua1
-rw-r--r--server/test/crossfile/hover.lua2
3 files changed, 2 insertions, 3 deletions
diff --git a/server/src/uri.lua b/server/src/uri.lua
index 4505d554..ec3cdad6 100644
--- a/server/src/uri.lua
+++ b/server/src/uri.lua
@@ -17,7 +17,7 @@ local function decode(uri)
end
local function encode(path)
- local fullPath = fs.absolute(path)
+ local fullPath = fs.absolute(ROOT / path)
local obj = URI_FILE.make_file_uri(fullPath:string(), OS)
local uri = obj:uri()
return uri
diff --git a/server/test.lua b/server/test.lua
index 8a1a9596..b1945a0e 100644
--- a/server/test.lua
+++ b/server/test.lua
@@ -12,7 +12,6 @@ package.path = rootPath .. 'test/?.lua'
local fs = require 'bee.filesystem'
ROOT = fs.absolute(fs.path(rootPath):parent_path())
-print('ROOT =', ROOT)
LANG = 'en-US'
log = require 'log'
diff --git a/server/test/crossfile/hover.lua b/server/test/crossfile/hover.lua
index 47fa0a45..1d4328e1 100644
--- a/server/test/crossfile/hover.lua
+++ b/server/test/crossfile/hover.lua
@@ -86,7 +86,7 @@ function TEST(data)
if hover.label then
hover.label = hover.label:gsub('\r\n', '\n')
end
- assert(eq(hover, data.hover), table.dump(hover) .. '\n' .. table.dump(data.hover))
+ assert(eq(hover, data.hover))
end
TEST {