From 2f984c1a2baf162f72240ca7b7f3f530459a71f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 17 Jan 2022 21:23:09 +0800 Subject: dont run this test --- test.lua | 4 ++-- test/tclient/lclient.lua | 15 ++++----------- test/tclient/tests/single-mode.lua | 4 ++++ 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/test.lua b/test.lua index dd5f36ba..3acab926 100644 --- a/test.lua +++ b/test.lua @@ -86,7 +86,7 @@ local function main() require 'language' 'zh-cn' require 'library'.init() loadDocMetas() - test 'tclient' + --test 'tclient' --config.Lua.intelliSense.searchDepth = 5 --loadDocMetas() @@ -100,7 +100,7 @@ local function main() require 'bee.platform'.OS = 'macOS' testAll() - test 'tclient' + --test 'tclient' --test 'full' diff --git a/test/tclient/lclient.lua b/test/tclient/lclient.lua index ae876400..50f13946 100644 --- a/test/tclient/lclient.lua +++ b/test/tclient/lclient.lua @@ -111,17 +111,10 @@ function mt:update() for _, out in ipairs(outs) do if out.method then local callback = self._methods[out.method] - if callback then - proto.doResponse { - id = out.id, - params = callback(out.params), - } - else - proto.doResponse { - id = out.id, - params = nil, - } - end + proto.doResponse { + id = out.id, + params = callback(out.params), + } else local callback = self._waiting[out.id] self._waiting[out.id] = nil diff --git a/test/tclient/tests/single-mode.lua b/test/tclient/tests/single-mode.lua index bdf831f4..e0773a7e 100644 --- a/test/tclient/tests/single-mode.lua +++ b/test/tclient/tests/single-mode.lua @@ -5,6 +5,10 @@ local util = require 'utility' ---@async lclient():start(function (client) + client:register('workspace/configuration', function () + return nil + end) + client:awaitRequest('initialize', { clientInfo = { name = 'unit-test', -- cgit v1.2.3