summaryrefslogtreecommitdiff
path: root/server/test
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-16 14:51:51 +0800
committersumneko <sumneko@hotmail.com>2019-04-16 14:51:51 +0800
commit8489692a0bc13d7a20a89f95c559046febce3448 (patch)
tree72cf645bdd3fabe609597e94ffa0cda4ffe3316c /server/test
parentf20c2fb4112a1b66c64d809e0ea1e201394ca512 (diff)
downloadlua-language-server-8489692a0bc13d7a20a89f95c559046febce3448.zip
使用lpeg实现搜索路径匹配
Diffstat (limited to 'server/test')
-rw-r--r--server/test/crossfile/completion.lua36
1 files changed, 36 insertions, 0 deletions
diff --git a/server/test/crossfile/completion.lua b/server/test/crossfile/completion.lua
index e89d013f..a55ff743 100644
--- a/server/test/crossfile/completion.lua
+++ b/server/test/crossfile/completion.lua
@@ -218,6 +218,42 @@ TEST {
TEST {
{
+ path = 'abc/init.lua',
+ content = '',
+ },
+ {
+ path = 'abc/bbc.lua',
+ content = '',
+ },
+ {
+ path = 'test.lua',
+ content = 'require "abc@"',
+ main = true,
+ },
+ completion = {
+ {
+ label = 'abc',
+ kind = CompletionItemKind.Reference,
+ documentation = 'abc/init.lua',
+ textEdit = EXISTS,
+ },
+ {
+ label = 'abc.bbc',
+ kind = CompletionItemKind.Reference,
+ documentation = 'abc/bbc.lua',
+ textEdit = EXISTS,
+ },
+ {
+ label = 'abc.init',
+ kind = CompletionItemKind.Reference,
+ documentation = 'abc/init.lua',
+ textEdit = EXISTS,
+ },
+ }
+}
+
+TEST {
+ {
path = 'abc.lua',
content = '',
},