summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-02-23 17:55:44 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-02-23 17:55:44 +0800
commitf8e2955268708728a1f83743d0b2000d2e089539 (patch)
tree102ede06a30d1629025f1c45096aff030e05c8ee /test
parentc1ccd90beef8b0a79a8e9c47547dda3dd865e14d (diff)
downloadlua-language-server-f8e2955268708728a1f83743d0b2000d2e089539.zip
cleanup
Diffstat (limited to 'test')
-rw-r--r--test/definition/field.lua23
-rw-r--r--test/definition/init.lua1
2 files changed, 24 insertions, 0 deletions
diff --git a/test/definition/field.lua b/test/definition/field.lua
new file mode 100644
index 00000000..5b5b67f9
--- /dev/null
+++ b/test/definition/field.lua
@@ -0,0 +1,23 @@
+TEST [[
+X.<!y!> = 1
+
+local t = X
+
+print(t.<?y?>)
+]]
+
+TEST [[
+X.x.<!y!> = 1
+
+local t = X.x
+
+print(t.<?y?>)
+]]
+
+TEST [[
+X.x.<!y!> = 1
+
+local t = X
+
+print(t.x.<?y?>)
+]]
diff --git a/test/definition/init.lua b/test/definition/init.lua
index fc2903c1..08b97442 100644
--- a/test/definition/init.lua
+++ b/test/definition/init.lua
@@ -44,6 +44,7 @@ end
require 'definition.local'
require 'definition.set'
+require 'definition.field'
require 'definition.arg'
require 'definition.function'
require 'definition.table'