diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-20 15:54:56 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-20 15:54:56 +0800 |
commit | 99691a901cc26bc44720ced49729d436a09129ba (patch) | |
tree | fc57d2d0aecd6081e360c637bf284c9a98983e65 /test | |
parent | a6ed5f5845d3a859bd88c72f47bc4fa9d120b2df (diff) | |
download | lua-language-server-99691a901cc26bc44720ced49729d436a09129ba.zip |
update
Diffstat (limited to 'test')
-rw-r--r-- | test/crossfile/hover.lua | 4 | ||||
-rw-r--r-- | test/diagnostics/type-check.lua | 13 |
2 files changed, 9 insertions, 8 deletions
diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua index 0bf8165b..08cde574 100644 --- a/test/crossfile/hover.lua +++ b/test/crossfile/hover.lua @@ -58,8 +58,8 @@ function TEST(expect) local hover = core.byUri(sourceUri, sourcePos) assert(hover) - hover = tostring(hover):gsub('\r\n', '\n') - assert(eq(hover, expect.hover)) + local content = tostring(hover):gsub('\r\n', '\n') + assert(eq(content, expect.hover)) end TEST { diff --git a/test/diagnostics/type-check.lua b/test/diagnostics/type-check.lua index c8ea17a4..c59d73ed 100644 --- a/test/diagnostics/type-check.lua +++ b/test/diagnostics/type-check.lua @@ -170,10 +170,15 @@ local a t = a ]] -do return end TEST [[ ----@diagnostic disable: unused-local +local m = {} + +---@type integer[] +m.ints = {} +]] +do return end +TEST [[ ---@class A ---@field x integer local t @@ -182,8 +187,6 @@ local t ]] TEST [[ ----@diagnostic disable: unused-local - ---@class A ---@field x integer local t @@ -195,8 +198,6 @@ local y ]] TEST [[ ----@diagnostic disable: unused-local - ---@class A ---@field x integer local t |