diff options
author | sumneko <sumneko@hotmail.com> | 2019-05-06 20:37:21 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-05-06 20:37:21 +0800 |
commit | 122f0cd318b54038761dd1523a49d00492d24f29 (patch) | |
tree | d17ae8a22b18b1684f9375e7d05b0b6111c02dfb /server/test | |
parent | 9be258a93dec660ace3ec153d3f154776663b599 (diff) | |
download | lua-language-server-122f0cd318b54038761dd1523a49d00492d24f29.zip |
内置类型
Diffstat (limited to 'server/test')
-rw-r--r-- | server/test/completion/init.lua | 37 | ||||
-rw-r--r-- | server/test/diagnostics/init.lua | 4 |
2 files changed, 22 insertions, 19 deletions
diff --git a/server/test/completion/init.lua b/server/test/completion/init.lua index 0d34a63b..19bf927a 100644 --- a/server/test/completion/init.lua +++ b/server/test/completion/init.lua @@ -807,28 +807,28 @@ TEST [[ } TEST [[ ----@class ABC ----@class BBC : $ +---@class ZABC +---@class ZBBC : Z$ ]] { { - label = 'ABC', + label = 'ZABC', kind = CompletionItemKind.Class, }, { - label = 'BBC', + label = 'ZBBC', kind = CompletionItemKind.Class, }, } TEST [[ ----@class abc +---@class zabc local abcd ----@type a$ +---@type za$ ]] { { - label = 'abc', + label = 'zabc', kind = CompletionItemKind.Class, }, } @@ -838,32 +838,27 @@ TEST [[ local abcd ---@type $ ]] -{ - { - label = 'abc', - kind = CompletionItemKind.Class, - }, -} +(EXISTS) TEST [[ ----@class abc +---@class zabc local abcd ----@type xxx|$ +---@type zxxx|z$ ]] { { - label = 'abc', + label = 'zabc', kind = CompletionItemKind.Class, } } TEST [[ ----@alias abc abb ----@type a$ +---@alias zabc zabb +---@type za$ ]] { { - label = 'abc', + label = 'zabc', kind = CompletionItemKind.Class, }, } @@ -877,6 +872,10 @@ TEST [[ label = 'Class', kind = CompletionItemKind.Class, }, + { + label = 'function', + kind = CompletionItemKind.Class, + }, } TEST [[ diff --git a/server/test/diagnostics/init.lua b/server/test/diagnostics/init.lua index 499ffe78..2ef052bf 100644 --- a/server/test/diagnostics/init.lua +++ b/server/test/diagnostics/init.lua @@ -426,3 +426,7 @@ TEST [[ ---@field <!x!> Class ---@field <!x!> Class ]] + +TEST [[ +---@class Class : any +]] |