summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-01-05 21:03:32 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-01-05 21:03:32 +0800
commitc2eaa0fa6d31208941d61fac9d93940e08d7a1d3 (patch)
tree9265e3749c5dfabd08981baff50a22f67fd3663c
parent36a0e0f40dafdab77dd3df2ead8bceb92e3ae193 (diff)
downloadlua-language-server-c2eaa0fa6d31208941d61fac9d93940e08d7a1d3.zip
fix test
-rw-r--r--script/core/diagnostics/init.lua4
-rw-r--r--test/crossfile/diagnostic.lua2
-rw-r--r--test/diagnostics/init.lua2
-rw-r--r--test/full/example.lua2
4 files changed, 6 insertions, 4 deletions
diff --git a/script/core/diagnostics/init.lua b/script/core/diagnostics/init.lua
index 9114371f..32375a3a 100644
--- a/script/core/diagnostics/init.lua
+++ b/script/core/diagnostics/init.lua
@@ -116,6 +116,8 @@ return function (uri, isScopeDiag, response, checked)
for _, name in ipairs(diagList) do
await.delay()
check(uri, name, isScopeDiag, response)
- checked(name)
+ if checked then
+ checked(name)
+ end
end
end
diff --git a/test/crossfile/diagnostic.lua b/test/crossfile/diagnostic.lua
index 0a32ddb0..43028744 100644
--- a/test/crossfile/diagnostic.lua
+++ b/test/crossfile/diagnostic.lua
@@ -56,7 +56,7 @@ function TEST(datas)
local results = {}
for _, data in ipairs(datas) do
local uri = furi.encode(data.path)
- core(uri, function (result)
+ core(uri, false, function (result)
results[#results+1] = {
result.start,
result.finish,
diff --git a/test/diagnostics/init.lua b/test/diagnostics/init.lua
index db4bbac9..cfe29d04 100644
--- a/test/diagnostics/init.lua
+++ b/test/diagnostics/init.lua
@@ -33,7 +33,7 @@ function TEST(script, ...)
files.open('')
local origins = {}
local results = {}
- core('', function (result)
+ core('', false, function (result)
results[#results+1] = { result.start, result.finish }
origins[#origins+1] = result
end)
diff --git a/test/full/example.lua b/test/full/example.lua
index cae2df07..ed5c3b16 100644
--- a/test/full/example.lua
+++ b/test/full/example.lua
@@ -53,7 +53,7 @@ local function testIfExit(path)
for i = 1, max do
files.open('')
files.setText('', buf)
- diag('', function () end)
+ diag('', false, function () end)
local passed = os.clock() - clock
if passed >= 1.0 or i == max then
need = passed / i