summaryrefslogtreecommitdiff
path: root/test-beta/completion/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test-beta/completion/init.lua')
-rw-r--r--test-beta/completion/init.lua45
1 files changed, 45 insertions, 0 deletions
diff --git a/test-beta/completion/init.lua b/test-beta/completion/init.lua
index cf79d795..f2fa9edf 100644
--- a/test-beta/completion/init.lua
+++ b/test-beta/completion/init.lua
@@ -1065,6 +1065,51 @@ t.$
}
}
+TEST [[
+local t = {
+ ['a.b.c'] = {}
+}
+
+t. $
+]]
+{
+ {
+ label = 'a.b.c',
+ kind = CompletionItemKind.Field,
+ textEdit = {
+ start = 40,
+ finish = 39,
+ newText = '["a.b.c"]',
+ },
+ additionalTextEdits = {
+ {
+ start = 36,
+ finish = 36,
+ newText = '',
+ },
+ },
+ }
+}
+
+TEST [[
+local t = {
+ ['a.b.c'] = {}
+}
+
+t['$']
+]]
+{
+ {
+ label = 'a.b.c',
+ kind = CompletionItemKind.Field,
+ textEdit = {
+ start = 37,
+ finish = 36,
+ newText = 'a.b.c',
+ },
+ }
+}
+
-- TODO
do return end
TEST [[