diff options
author | sumneko <sumneko@hotmail.com> | 2019-04-16 14:51:51 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-04-16 14:51:51 +0800 |
commit | 8489692a0bc13d7a20a89f95c559046febce3448 (patch) | |
tree | 72cf645bdd3fabe609597e94ffa0cda4ffe3316c /server/test | |
parent | f20c2fb4112a1b66c64d809e0ea1e201394ca512 (diff) | |
download | lua-language-server-8489692a0bc13d7a20a89f95c559046febce3448.zip |
使用lpeg实现搜索路径匹配
Diffstat (limited to 'server/test')
-rw-r--r-- | server/test/crossfile/completion.lua | 36 |
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 = '', }, |