diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-28 16:01:17 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-28 16:01:17 +0800 |
commit | 6f3cb7196f0230f6cf18b21a1617d133d32d611c (patch) | |
tree | 1b97090f771957c0c48d3315f81ec98c313effcc /server/test/crossfile | |
parent | d0cad6f25ede39e95ae4486a24abba643b0860fb (diff) | |
download | lua-language-server-6f3cb7196f0230f6cf18b21a1617d133d32d611c.zip |
修正自动完成搜索require的bug
Diffstat (limited to 'server/test/crossfile')
-rw-r--r-- | server/test/crossfile/completion.lua | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/server/test/crossfile/completion.lua b/server/test/crossfile/completion.lua index f136a057..da4c1d7d 100644 --- a/server/test/crossfile/completion.lua +++ b/server/test/crossfile/completion.lua @@ -194,6 +194,50 @@ TEST { TEST { { + path = 'abc.lua', + content = '', + }, + { + path = 'abc/init.lua', + content = '', + }, + { + path = 'test.lua', + content = 'require "abc.i@"', + main = true, + }, + completion = { + { + label = 'abc.init', + kind = CompletionItemKind.File, + }, + } +} + +TEST { + { + path = 'core/core.lua', + content = '', + }, + { + path = 'core/xxx.lua', + content = '', + }, + { + path = 'test.lua', + content = 'require "core.co@"', + main = true, + }, + completion = { + { + label = 'core.core', + kind = CompletionItemKind.File, + }, + } +} + +TEST { + { path = 'x000.lua', content = '', }, |