summaryrefslogtreecommitdiff
path: root/server/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-19 13:55:54 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-19 13:55:54 +0800
commit316fac0c3c4981444db27b18c2caaef29c32418e (patch)
treee6151046c5407fee4fa7ec8b28d1506266b5da9a /server/test
parent3400b54cca23a5440502897fd848dd01684d021b (diff)
downloadlua-language-server-316fac0c3c4981444db27b18c2caaef29c32418e.zip
支持找全局变量
Diffstat (limited to 'server/test')
-rw-r--r--server/test/completion/init.lua49
1 files changed, 38 insertions, 11 deletions
diff --git a/server/test/completion/init.lua b/server/test/completion/init.lua
index da633a86..218a6a46 100644
--- a/server/test/completion/init.lua
+++ b/server/test/completion/init.lua
@@ -68,36 +68,63 @@ function TEST(script)
end
TEST [[
-local abcde
-a@
+local zabcde
+za@
]]
{
{
- label = 'abcde',
+ label = 'zabcde',
kind = CompletionItemKind.Variable,
}
}
TEST [[
-local abcdefg
-local abcde
-abcde@
+local zabcdefg
+local zabcde
+zabcde@
]]
{
{
- label = 'abcdefg',
+ label = 'zabcdefg',
kind = CompletionItemKind.Variable,
}
}
TEST [[
-local abcdefg
-a@
-local abcde
+local zabcdefg
+za@
+local zabcde
]]
{
{
- label = 'abcdefg',
+ label = 'zabcdefg',
kind = CompletionItemKind.Variable,
}
}
+
+TEST [[
+local zabcde
+zace@
+]]
+{
+ {
+ label = 'zabcde',
+ kind = CompletionItemKind.Variable,
+ }
+}
+
+TEST [[
+ZABC
+local zabc
+zac@
+]]
+{
+ {
+ label = 'zabc',
+ kind = CompletionItemKind.Variable,
+ },
+ {
+ label = 'ZABC',
+ kind = CompletionItemKind.Field,
+ },
+}