diff options
author | sumneko <sumneko@hotmail.com> | 2019-05-08 14:37:49 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-05-08 14:37:49 +0800 |
commit | 3021033d1b11e916c93cfe78dcc9056366837ff6 (patch) | |
tree | d01116438c67c3eaed9a5dec0ecd2d8957816a15 /server/test | |
parent | c421e5c29e1cc6302739e69cdc8c9b7310a00e1a (diff) | |
download | lua-language-server-3021033d1b11e916c93cfe78dcc9056366837ff6.zip |
整理代码
Diffstat (limited to 'server/test')
-rw-r--r-- | server/test/crossfile/completion.lua | 2 | ||||
-rw-r--r-- | server/test/crossfile/definition.lua | 2 | ||||
-rw-r--r-- | server/test/crossfile/document_symbol.lua | 4 | ||||
-rw-r--r-- | server/test/crossfile/hover.lua | 4 | ||||
-rw-r--r-- | server/test/crossfile/references.lua | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/server/test/crossfile/completion.lua b/server/test/crossfile/completion.lua index 67928fb6..4ee9508e 100644 --- a/server/test/crossfile/completion.lua +++ b/server/test/crossfile/completion.lua @@ -80,7 +80,7 @@ function TEST(data) mainBuf = script end lsp:saveText(uri, 1, script) - ws:addFile(uri) + ws:addFile(ws:uriDecode(uri)) while lsp._needCompile[1] do lsp:compileVM(lsp._needCompile[1]) diff --git a/server/test/crossfile/definition.lua b/server/test/crossfile/definition.lua index 9de93c92..90bf1651 100644 --- a/server/test/crossfile/definition.lua +++ b/server/test/crossfile/definition.lua @@ -79,7 +79,7 @@ function TEST(datas) data.content = new end lsp:saveText(uri, 1, data.content) - ws:addFile(uri) + ws:addFile(ws:uriDecode(uri)) end while lsp._needCompile[1] do diff --git a/server/test/crossfile/document_symbol.lua b/server/test/crossfile/document_symbol.lua index 015e3638..e09ed5d1 100644 --- a/server/test/crossfile/document_symbol.lua +++ b/server/test/crossfile/document_symbol.lua @@ -71,9 +71,9 @@ function TEST(data) local sourceUri = ws:uriEncode(fs.path(data[2].path)) lsp:saveText(sourceUri, 1, data[2].content) - ws:addFile(sourceUri) + ws:addFile(ws:uriDecode(sourceUri)) lsp:saveText(targetUri, 1, data[1].content) - ws:addFile(targetUri) + ws:addFile(ws:uriDecode(targetUri)) while lsp._needCompile[1] do lsp:compileVM(lsp._needCompile[1]) end diff --git a/server/test/crossfile/hover.lua b/server/test/crossfile/hover.lua index 41aef8dc..fc5df36a 100644 --- a/server/test/crossfile/hover.lua +++ b/server/test/crossfile/hover.lua @@ -63,10 +63,10 @@ function TEST(data) local sourceUri = ws:uriEncode(fs.path(data[2].path)) lsp:saveText(targetUri, 1, targetScript) - ws:addFile(targetUri) + ws:addFile(ws:uriDecode(targetUri)) lsp:compileVM(targetUri) lsp:saveText(sourceUri, 1, sourceScript) - ws:addFile(sourceUri) + ws:addFile(ws:uriDecode(sourceUri)) lsp:compileVM(sourceUri) local sourceVM = lsp:loadVM(sourceUri) diff --git a/server/test/crossfile/references.lua b/server/test/crossfile/references.lua index 4163a321..dd1958aa 100644 --- a/server/test/crossfile/references.lua +++ b/server/test/crossfile/references.lua @@ -80,7 +80,7 @@ function TEST(data) local expect = {} for _, info in ipairs(data) do local uri = ws:uriEncode(fs.path(info.path)) - ws:addFile(uri) + ws:addFile(ws:uriDecode(uri)) end for _, info in ipairs(data) do local uri = ws:uriEncode(fs.path(info.path)) |