diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-05 05:56:03 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-05 05:56:03 +0800 |
commit | 0e159ee03730b74c284c5ad079215b31461d266e (patch) | |
tree | 9fd2d7aef9903d9c9c2d07749ea9f1175b0eee77 /test/completion/common.lua | |
parent | 9310038417408a5c2f6c148447d951f248fce2fe (diff) | |
download | lua-language-server-0e159ee03730b74c284c5ad079215b31461d266e.zip |
update
Diffstat (limited to 'test/completion/common.lua')
-rw-r--r-- | test/completion/common.lua | 45 |
1 files changed, 43 insertions, 2 deletions
diff --git a/test/completion/common.lua b/test/completion/common.lua index 787549f7..dbc90ade 100644 --- a/test/completion/common.lua +++ b/test/completion/common.lua @@ -607,7 +607,7 @@ self.results.list[#self.re<??>] }, { label = 'results', - kind = define.CompletionItemKind.Field, + kind = define.CompletionItemKind.Text, }, } @@ -1169,10 +1169,51 @@ TEST [[ } TEST [[ +---@class ZBBC +---@class ZBBC : Z<??> +]] +(nil) + +TEST [[ ---@class ZABC ---@class ZBBC : <??> ]] -(EXISTS) +(function (results) + local ok + for _, res in ipairs(results) do + if res.label == 'ZABC' then + ok = true + end + if res.label == 'ZBBC' then + error('ZBBC should not be here') + end + end + assert(ok, 'ZABC should be here') +end) + +TEST [[ +---@class ZBBC +---@class ZBBC : <??> +]] +(function (results) + for _, res in ipairs(results) do + if res.label == 'ZBBC' then + error('ZBBC should not be here') + end + end +end) + +TEST [[ +---@class ZABC +---@class ZABC +---@class ZBBC : Z<??> +]] +{ + { + label = 'ZABC', + kind = define.CompletionItemKind.Class, + }, +} TEST [[ ---@class zabc |