diff options
Diffstat (limited to 'server/test')
-rw-r--r-- | server/test/completion/init.lua | 17 | ||||
-rw-r--r-- | server/test/crossfile/hover.lua | 19 |
2 files changed, 36 insertions, 0 deletions
diff --git a/server/test/completion/init.lua b/server/test/completion/init.lua index 2b63358e..c60e8ea0 100644 --- a/server/test/completion/init.lua +++ b/server/test/completion/init.lua @@ -1321,3 +1321,20 @@ JustTest }, } } + +TEST [[ +--- abc +zzz = 1 +zz$ +]] +{ + { + label = 'zzz', + kind = CompletionItemKind.Enum, + detail = '(number) = 1', + documentation = { + kind = 'markdown', + value = 'abc', + } + } +} diff --git a/server/test/crossfile/hover.lua b/server/test/crossfile/hover.lua index 6941edb8..b0b8ab61 100644 --- a/server/test/crossfile/hover.lua +++ b/server/test/crossfile/hover.lua @@ -240,3 +240,22 @@ TEST { description = 'abc', } } + +TEST { + { + path = 'a.lua', + content = '', + }, + { + path = 'b.lua', + content = [[ + --- abc + <?x?> = 1 + ]], + }, + hover = { + label = [[global x: number = 1]], + name = 'x', + description = 'abc', + } +} |