summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-11-02 17:29:18 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-11-02 17:29:18 +0800
commit625f5be9a6ae1c30dd5821f1dd2485073d054209 (patch)
tree2581abc44fa0b6a42b590fc842501b8a9edf9a1f /test
parent3bf48c900605681216ce7c14cfe0cb43e583de4f (diff)
downloadlua-language-server-625f5be9a6ae1c30dd5821f1dd2485073d054209.zip
`---@see` use workspace-symbol
#1344
Diffstat (limited to 'test')
-rw-r--r--test/completion/common.lua12
-rw-r--r--test/crossfile/definition.lua1
-rw-r--r--test/definition/init.lua1
-rw-r--r--test/definition/luadoc.lua23
4 files changed, 29 insertions, 8 deletions
diff --git a/test/completion/common.lua b/test/completion/common.lua
index bf43a463..7266de16 100644
--- a/test/completion/common.lua
+++ b/test/completion/common.lua
@@ -3963,3 +3963,15 @@ t.<??>
kind = define.CompletionItemKind.Field,
},
}
+
+TEST [[
+---@class ABCD
+
+---@see ABCD<??>
+]]
+{
+ {
+ label = 'ABCD',
+ kind = define.CompletionItemKind.Class,
+ },
+}
diff --git a/test/crossfile/definition.lua b/test/crossfile/definition.lua
index 45f21697..ef9b5240 100644
--- a/test/crossfile/definition.lua
+++ b/test/crossfile/definition.lua
@@ -26,6 +26,7 @@ local function founded(targets, results)
return true
end
+---@async
function TEST(datas)
local targetList = {}
local sourceList
diff --git a/test/definition/init.lua b/test/definition/init.lua
index 7e0a7989..eb6f1435 100644
--- a/test/definition/init.lua
+++ b/test/definition/init.lua
@@ -21,6 +21,7 @@ local function founded(targets, results)
return true
end
+---@async
function TEST(script)
local newScript, catched = catch(script, '!?')
diff --git a/test/definition/luadoc.lua b/test/definition/luadoc.lua
index c14e1242..d8da938e 100644
--- a/test/definition/luadoc.lua
+++ b/test/definition/luadoc.lua
@@ -207,23 +207,30 @@ y.<?a?>
]]
TEST [[
----@class <!loli!>
-local unit!>
+---@class <!A!>
+local mt
-function unit:pants()
+function mt:f()
end
----@see <?loli?>
+---@see <?A?>
]]
TEST [[
----@class loli
-local unit
+---@class A
+local mt
-function unit:<!pants!>()
+function <!mt:f!>()
end
----@see loli#<?pants?>
+---@see <?A.f?>
+]]
+
+TEST [[
+AAA = {}
+<!AAA.BBB!> = 1
+
+---@see <?AAA.BBB?>
]]
TEST [[