summaryrefslogtreecommitdiff
path: root/test/definition
diff options
context:
space:
mode:
Diffstat (limited to 'test/definition')
-rw-r--r--test/definition/init.lua1
-rw-r--r--test/definition/luadoc.lua23
2 files changed, 16 insertions, 8 deletions
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 [[