summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-12 21:07:13 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-12 21:07:13 +0800
commit4c64ad0cbfc659766ed6f296219a30faf55202d8 (patch)
treeaed66e68ff4c6fff3501a7938ab200166f809b79 /test
parentd9d65f5720ec8f9052e84f839161a781613592d3 (diff)
downloadlua-language-server-4c64ad0cbfc659766ed6f296219a30faf55202d8.zip
update
Diffstat (limited to 'test')
-rw-r--r--test/example/meta.json (renamed from test/example/memoryAPI.json)0
-rw-r--r--test/tclient/init.lua1
-rw-r--r--test/tclient/tests/build-meta.lua18
3 files changed, 19 insertions, 0 deletions
diff --git a/test/example/memoryAPI.json b/test/example/meta.json
index 658618e2..658618e2 100644
--- a/test/example/memoryAPI.json
+++ b/test/example/meta.json
diff --git a/test/tclient/init.lua b/test/tclient/init.lua
index 2b470887..070cf337 100644
--- a/test/tclient/init.lua
+++ b/test/tclient/init.lua
@@ -8,3 +8,4 @@ require 'tclient.tests.resolve-completion'
require 'tclient.tests.performance-jass-common'
require 'tclient.tests.hover-pairs'
require 'tclient.tests.change-workspace-folder'
+require 'tclient.tests.build-meta'
diff --git a/test/tclient/tests/build-meta.lua b/test/tclient/tests/build-meta.lua
new file mode 100644
index 00000000..13f41a7a
--- /dev/null
+++ b/test/tclient/tests/build-meta.lua
@@ -0,0 +1,18 @@
+local lclient = require 'lclient'
+local util = require 'utility'
+local ws = require 'workspace'
+local json = require 'json'
+
+---@async
+lclient():start(function (client)
+ client:registerFakers()
+
+ client:initialize()
+
+ local text = util.loadFile((ROOT / 'test' / 'example' / 'meta.json'):string())
+ local meta = json.decode(text)
+
+ client:notify('$/api/report', meta)
+
+ ws.awaitReady()
+end)