summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-04-13 21:08:50 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-04-13 21:08:50 +0800
commit161e02bb631b7f5916c11119323305aa2c258775 (patch)
treea93f0aef2b97799f55080212e3c7f32f03394c68 /test
parent92a52e786a690e6e7fcb3c4d6357a39884993736 (diff)
downloadlua-language-server-161e02bb631b7f5916c11119323305aa2c258775.zip
stash
Diffstat (limited to 'test')
-rw-r--r--test/basic/linker.lua39
1 files changed, 39 insertions, 0 deletions
diff --git a/test/basic/linker.lua b/test/basic/linker.lua
index 5fd48ce4..1ce3f726 100644
--- a/test/basic/linker.lua
+++ b/test/basic/linker.lua
@@ -2,6 +2,7 @@ local linker = require 'core.linker'
local files = require 'files'
local util = require 'utility'
local guide = require 'core.guide'
+local glob = require "glob"
local function getSource(pos)
local ast = files.getAst('')
@@ -73,3 +74,41 @@ print(x.y.<?z?>)
]] {
id = '7|"y"|"z"',
}
+
+TEST [[
+local x
+function x:<?f?>() end
+]] {
+ id = '7|"f"',
+}
+
+TEST [[
+print(X.Y.<?Z?>)
+]] {
+ id = '"X"|"Y"|"Z"',
+ global = true,
+}
+
+TEST [[
+function x:<?f?>() end
+]] {
+ id = '"x"|"f"',
+ global = true,
+}
+
+TEST [[
+{
+ <?x?> = 1,
+}
+]] {
+ id = '1|"x"',
+ tfield = true,
+}
+
+TEST [[
+return <?X?>
+]] {
+ id = '"X"',
+ global = true,
+ freturn = true,
+}