summaryrefslogtreecommitdiff
path: root/server/test/crossfile
diff options
context:
space:
mode:
Diffstat (limited to 'server/test/crossfile')
-rw-r--r--server/test/crossfile/completion.lua38
1 files changed, 38 insertions, 0 deletions
diff --git a/server/test/crossfile/completion.lua b/server/test/crossfile/completion.lua
index 15b19176..7d4513ba 100644
--- a/server/test/crossfile/completion.lua
+++ b/server/test/crossfile/completion.lua
@@ -217,3 +217,41 @@ TEST {
},
}
}
+
+TEST {
+ {
+ path = 'a.lua',
+ content = [[
+ return {
+ a = 1,
+ b = 2,
+ c = 3,
+ }
+ ]]
+ },
+ {
+ path = 'b.lua',
+ content = [[
+ local t = require 'a'
+ t.@
+ ]],
+ main = true,
+ },
+ completion = {
+ {
+ label = 'a',
+ kind = CompletionItemKind.Enum,
+ detail = '= 1',
+ },
+ {
+ label = 'b',
+ kind = CompletionItemKind.Enum,
+ detail = '= 2',
+ },
+ {
+ label = 'c',
+ kind = CompletionItemKind.Enum,
+ detail = '= 3',
+ },
+ }
+}