summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
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 [[