summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-02-08 16:41:52 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-02-08 16:41:52 +0800
commit81976b2896c34aa599515b922b98d3a57d2a6fc9 (patch)
treee8cc764406add3ed4c3db6d34ca47e784125e38c /test
parentd2b7ad50811f160833c9509cdde7b6b512fec902 (diff)
downloadlua-language-server-81976b2896c34aa599515b922b98d3a57d2a6fc9.zip
pass tests
Diffstat (limited to 'test')
-rw-r--r--test/crossfile/completion.lua18
1 files changed, 15 insertions, 3 deletions
diff --git a/test/crossfile/completion.lua b/test/crossfile/completion.lua
index 18b5d1a1..04ec10b3 100644
--- a/test/crossfile/completion.lua
+++ b/test/crossfile/completion.lua
@@ -1,7 +1,8 @@
-local files = require 'files'
-local core = require 'core.completion'
-local furi = require 'file-uri'
+local files = require 'files'
+local core = require 'core.completion'
+local furi = require 'file-uri'
local platform = require 'bee.platform'
+local util = require 'utility'
rawset(_G, 'TEST', true)
@@ -67,6 +68,16 @@ local Cared = {
['textEdit'] = true,
}
+local function removeMetas(results)
+ local removes = {}
+ for i, res in ipairs(results) do
+ if res.description and res.description:find 'meta' then
+ removes[#removes+1] = i
+ end
+ end
+ util.tableMultiRemove(results, removes)
+end
+
function TEST(data)
files.removeAll()
@@ -92,6 +103,7 @@ function TEST(data)
end
assert(result ~= nil)
result.enableCommon = nil
+ removeMetas(result)
for _, item in ipairs(result) do
local r = core.resolve(item.id)
for k, v in pairs(r or {}) do