summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-04-14 21:50:06 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-04-14 21:50:06 +0800
commitea2967268c4a6e1aae2b0688177451c91dee982a (patch)
tree50349eda44b25aa9e866a6e150a27ca2054d1235 /test
parent337a90407fd11ede8f184cdd6e223ee47c8e1193 (diff)
downloadlua-language-server-ea2967268c4a6e1aae2b0688177451c91dee982a.zip
stash
Diffstat (limited to 'test')
-rw-r--r--test/basic/linker.lua10
-rw-r--r--test/references/init.lua10
2 files changed, 18 insertions, 2 deletions
diff --git a/test/basic/linker.lua b/test/basic/linker.lua
index bf52c949..3b18ddc9 100644
--- a/test/basic/linker.lua
+++ b/test/basic/linker.lua
@@ -11,8 +11,14 @@ local function getSource(pos)
or source.type == 'setlocal'
or source.type == 'setglobal'
or source.type == 'getglobal'
- or source.type == 'field'
- or source.type == 'method'
+ or source.type == 'setfield'
+ or source.type == 'getfield'
+ or source.type == 'setmethod'
+ or source.type == 'getmethod'
+ or source.type == 'tablefield'
+ or source.type == 'setindex'
+ or source.type == 'getindex'
+ or source.type == 'tableindex'
or source.type == 'label'
or source.type == 'goto' then
return source
diff --git a/test/references/init.lua b/test/references/init.lua
index c4e5018a..e24694d2 100644
--- a/test/references/init.lua
+++ b/test/references/init.lua
@@ -96,6 +96,16 @@ local <?a?> = 1
]]
TEST [[
+local <!a!>
+local <?b?> = <!a!>
+]]
+
+TEST [[
+local <?a?>
+local <!b!> = <!a!>
+]]
+
+TEST [[
local t = {
<!a!> = 1
}