diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/completion/init.lua | 17 | ||||
-rw-r--r-- | test/highlight/init.lua | 2 |
2 files changed, 18 insertions, 1 deletions
diff --git a/test/completion/init.lua b/test/completion/init.lua index 676480f5..7db54f2f 100644 --- a/test/completion/init.lua +++ b/test/completion/init.lua @@ -2060,6 +2060,23 @@ TEST [[ ---@param x cc local function f(x) end +f({aaa = 1,$}) +]] +{ + { + label = 'bbb', + kind = define.CompletionItemKind.Property, + }, +} + +TEST [[ +---@class cc +---@field aaa number # a1 +---@field bbb number # a2 + +---@param x cc +local function f(x) end + f({ { $ diff --git a/test/highlight/init.lua b/test/highlight/init.lua index 9f899113..2bf639fa 100644 --- a/test/highlight/init.lua +++ b/test/highlight/init.lua @@ -39,7 +39,7 @@ function TEST(script) for _, enter in ipairs(target) do local start, finish = enter.start, enter.finish files.removeAll() - local pos = (start + finish) // 2 + 1 + local pos = (start + finish) // 2 local new_script = script:gsub('<[!?~]', ' '):gsub('[!?~]>', ' ') files.setText('', new_script) |