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