summaryrefslogtreecommitdiff
path: root/server/test
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-28 11:47:54 +0800
committersumneko <sumneko@hotmail.com>2019-04-28 11:47:54 +0800
commite6252422506c45dfb4c583ca2438cc090ea4a282 (patch)
tree480ad277282a8ec472f439edd351852c9e0ff3b9 /server/test
parent0e3fe7fe0c9d660d26a735b0d3d962f4c4289ca8 (diff)
downloadlua-language-server-e6252422506c45dfb4c583ca2438cc090ea4a282.zip
过滤交给前端
Diffstat (limited to 'server/test')
-rw-r--r--server/test/completion/init.lua24
-rw-r--r--server/test/crossfile/completion.lua18
2 files changed, 33 insertions, 9 deletions
diff --git a/server/test/completion/init.lua b/server/test/completion/init.lua
index 6a3b6f29..21a80509 100644
--- a/server/test/completion/init.lua
+++ b/server/test/completion/init.lua
@@ -216,6 +216,11 @@ loc$
]]
{
{
+ label = 'collectgarbage',
+ kind = CompletionItemKind.Function,
+ documentation = EXISTS,
+ },
+ {
label = 'local',
kind = CompletionItemKind.Keyword,
}
@@ -320,6 +325,11 @@ local t = {
kind = CompletionItemKind.Property,
},
{
+ label = 'next',
+ kind = CompletionItemKind.Function,
+ documentation = EXISTS,
+ },
+ {
label = 'xpcall',
kind = CompletionItemKind.Function,
documentation = EXISTS,
@@ -746,6 +756,16 @@ else$
detail = EXISTS,
},
{
+ label = 'select',
+ kind = CompletionItemKind.Function,
+ documentation = EXISTS,
+ },
+ {
+ label = 'setmetatable',
+ kind = CompletionItemKind.Function,
+ documentation = EXISTS,
+ },
+ {
label = 'else',
kind = CompletionItemKind.Keyword,
},
@@ -968,5 +988,9 @@ end
{
label = 'type',
kind = CompletionItemKind.Keyword,
+ },
+ {
+ label = 'return',
+ kind = CompletionItemKind.Keyword,
}
}
diff --git a/server/test/crossfile/completion.lua b/server/test/crossfile/completion.lua
index 2c781e9e..67928fb6 100644
--- a/server/test/crossfile/completion.lua
+++ b/server/test/crossfile/completion.lua
@@ -427,31 +427,31 @@ TEST {
{
path = 'a.lua',
content = [[
- abc = 1
+ zabc = 1
]]
},
{
path = 'a.lua',
content = [[
- abcd = print
+ zabcd = print
]]
},
{
path = 'a.lua',
content = [[
- abcdef = 1
+ zabcdef = 1
]]
},
{
path = 'b.lua',
content = [[
- ab$
+ zab$
]],
main = true,
},
completion = {
{
- label = 'abcdef',
+ label = 'zabcdef',
kind = CompletionItemKind.Enum,
detail = '= 1',
},
@@ -468,25 +468,25 @@ TEST {
{
path = 'a.lua',
content = [[
- print(abc)
+ print(zabc)
]]
},
{
path = 'a.lua',
content = [[
- abcdef = 1
+ zabcdef = 1
]]
},
{
path = 'b.lua',
content = [[
- ab$
+ zab$
]],
main = true,
},
completion = {
{
- label = 'abcdef',
+ label = 'zabcdef',
kind = CompletionItemKind.Enum,
detail = '= 1',
},