diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-09-28 17:52:36 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-09-28 17:52:36 +0800 |
commit | cb906398cbdfb9809811d5322440b6e57b0f8bc0 (patch) | |
tree | b07a744382aac693d1ba3dad8ca8dd60e14f61f4 /test | |
parent | ceb7cc19eacc7b7d14d0681fd3bbd80ad27a5a10 (diff) | |
parent | c45a21271556b6c689ee61fd5353846f469e4622 (diff) | |
download | lua-language-server-cb906398cbdfb9809811d5322440b6e57b0f8bc0.zip |
Merge branch 'callback'
Diffstat (limited to 'test')
-rw-r--r-- | test/crossfile/hover.lua | 17 | ||||
-rw-r--r-- | test/diagnostics/init.lua | 5 | ||||
-rw-r--r-- | test/type_inference/init.lua | 7 |
3 files changed, 28 insertions, 1 deletions
diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua index 1c46214c..97e6218d 100644 --- a/test/crossfile/hover.lua +++ b/test/crossfile/hover.lua @@ -969,3 +969,20 @@ p: T | b -- comment 3 -- comment 4 ```]]} + +TEST {{ path = 'a.lua', content = '', }, { + path = 'b.lua', + content = [[ +---@param x number # aaa +local f + +function f(<?x?>) end +]] +}, +hover = [[ +```lua +local x: number +``` + +--- + aaa]]} diff --git a/test/diagnostics/init.lua b/test/diagnostics/init.lua index 687027b8..bb613112 100644 --- a/test/diagnostics/init.lua +++ b/test/diagnostics/init.lua @@ -461,7 +461,7 @@ f(1, 2, 3) ]] TEST [[ -<!unpack!>(<!1!>) +<!unpack!>() ]] TEST [[ @@ -1135,6 +1135,9 @@ return { } ]] +-- TODO +do return end + TEST [[ ---@param table table ---@param metatable table diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 13efbc59..a4dbf249 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -871,3 +871,10 @@ for _, a in ipairs(v) do end end ]] + +TEST 'number' [[ +---@param x number +local f + +f = function (<?x?>) end +]] |