diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-09-13 18:51:41 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-09-13 18:51:41 +0800 |
commit | 295f5528dbf53f3ab929cf4cf9e6afda502076a4 (patch) | |
tree | b50ecd69102a8f416e6ba67b72e1d15547577b20 /test-beta/crossfile/completion.lua | |
parent | 044342b769a858297ffa35c03db84ed613cd95bb (diff) | |
download | lua-language-server-295f5528dbf53f3ab929cf4cf9e6afda502076a4.zip |
相对路径维持大小写
Diffstat (limited to 'test-beta/crossfile/completion.lua')
-rw-r--r-- | test-beta/crossfile/completion.lua | 99 |
1 files changed, 5 insertions, 94 deletions
diff --git a/test-beta/crossfile/completion.lua b/test-beta/crossfile/completion.lua index b20f652c..01aa924d 100644 --- a/test-beta/crossfile/completion.lua +++ b/test-beta/crossfile/completion.lua @@ -104,8 +104,6 @@ function TEST(data) assert(eq(expect, result)) end -if require'bee.platform'.OS == 'Windows' then - TEST { { path = 'abc.lua', @@ -166,11 +164,8 @@ TEST { completion = { { label = 'abc', - filterText = 'abc', kind = CompletionItemKind.Reference, - documentation = 'abc.lua', textEdit = EXISTS, - additionalTextEdits = EXISTS, }, } } @@ -192,53 +187,17 @@ TEST { completion = { { label = 'ABCD', - filterText = 'ABCD', kind = CompletionItemKind.Reference, - documentation = 'ABCD.lua', textEdit = EXISTS, - additionalTextEdits = EXISTS, - }, - { - label = 'abc', - filterText = 'abc', - kind = CompletionItemKind.Reference, - documentation = 'abc.lua', - textEdit = EXISTS, - additionalTextEdits = EXISTS, }, - } -} - -else - -TEST { - { - path = 'abc.lua', - content = '', - }, - { - path = 'ABCD.lua', - content = '', - }, - { - path = 'test.lua', - content = 'require "a$"', - main = true, - }, - completion = { { label = 'abc', - filterText = 'abc', kind = CompletionItemKind.Reference, - documentation = 'abc.lua', textEdit = EXISTS, - additionalTextEdits = EXISTS, }, } } -end - TEST { { path = 'abc.lua', @@ -256,19 +215,13 @@ TEST { completion = { { label = 'abc', - filterText = 'abc', kind = CompletionItemKind.Reference, - documentation = 'abc.lua', textEdit = EXISTS, - additionalTextEdits = EXISTS, }, { label = 'abc.init', - filterText = 'abc.init', kind = CompletionItemKind.Reference, - documentation = 'abc/init.lua', textEdit = EXISTS, - additionalTextEdits = EXISTS, }, } } @@ -290,53 +243,18 @@ TEST { completion = { { label = 'abc', - filterText = 'abc', kind = CompletionItemKind.Reference, - documentation = 'abc/init.lua', textEdit = EXISTS, - additionalTextEdits = EXISTS, }, { label = 'abc.bbc', - filterText = 'abc.bbc', kind = CompletionItemKind.Reference, - documentation = 'abc/bbc.lua', textEdit = EXISTS, - additionalTextEdits = EXISTS, }, { label = 'abc.init', - filterText = 'abc.init', kind = CompletionItemKind.Reference, - documentation = 'abc/init.lua', textEdit = EXISTS, - additionalTextEdits = EXISTS, - }, - } -} - -TEST { - { - path = 'abc.lua', - content = '', - }, - { - path = 'abc/init.lua', - content = '', - }, - { - path = 'test.lua', - content = 'require "abc.$"', - main = true, - }, - completion = { - { - label = 'abc.init', - filterText = 'abc.init', - kind = CompletionItemKind.Reference, - documentation = 'abc/init.lua', - textEdit = EXISTS, - additionalTextEdits = EXISTS, }, } } @@ -358,11 +276,8 @@ TEST { completion = { { label = 'abc.init', - filterText = 'abc.init', kind = CompletionItemKind.Reference, - documentation = 'abc/init.lua', textEdit = EXISTS, - additionalTextEdits = EXISTS, }, } } @@ -384,11 +299,8 @@ TEST { completion = { { label = 'core.core', - filterText = 'core.core', kind = CompletionItemKind.Reference, - documentation = 'core/core.lua', textEdit = EXISTS, - additionalTextEdits = EXISTS, }, } } @@ -409,20 +321,19 @@ TEST { }, completion = { { + label = 'abc.x111', + kind = CompletionItemKind.Reference, + textEdit = EXISTS, + }, + { label = 'x000', - filterText = 'x000', kind = CompletionItemKind.Reference, - documentation = 'x000.lua', textEdit = EXISTS, - additionalTextEdits = EXISTS, }, { label = 'x111', - filterText = 'x111', kind = CompletionItemKind.Reference, - documentation = 'abc/x111.lua', textEdit = EXISTS, - additionalTextEdits = EXISTS, }, } } |