summaryrefslogtreecommitdiff
path: root/test/basic
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-04-21 17:22:24 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-04-21 17:22:24 +0800
commit6a83c3aabf00300ca9742a1f207fe249e443fa6e (patch)
treed3e266892144da5854778089bb8225f4e0f5c3ca /test/basic
parent8f96b9499f020d2f2887b53493028c619f16587a (diff)
downloadlua-language-server-6a83c3aabf00300ca9742a1f207fe249e443fa6e.zip
cleanup
Diffstat (limited to 'test/basic')
-rw-r--r--test/basic/linker.lua1
-rw-r--r--test/basic/linker.txt14
2 files changed, 15 insertions, 0 deletions
diff --git a/test/basic/linker.lua b/test/basic/linker.lua
index d658c782..0b01f441 100644
--- a/test/basic/linker.lua
+++ b/test/basic/linker.lua
@@ -37,6 +37,7 @@ local function TEST(script)
files.setText('', newScript)
local source = getSource(pos)
assert(source)
+ linker.compileLinks(source)
local result = linker.getLink(source)
for key in pairs(CARE) do
assert(result[key] == expect[key])
diff --git a/test/basic/linker.txt b/test/basic/linker.txt
index 76b1980c..284623cd 100644
--- a/test/basic/linker.txt
+++ b/test/basic/linker.txt
@@ -72,3 +72,17 @@ expect: 't|2|b|c'
forward: nil
backward: 't|2|b' + '|c'
last: nil
+
+```lua
+---@return <?A?>
+local function f()
+end
+
+local <!x!> = f()
+```
+
+'d|A'
+'f|1:1'
+'f|1' + ':1'
+'l|1' + ':1'
+'s|1' + ':1'