diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-11-30 17:56:02 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-11-30 17:56:02 +0800 |
commit | 2d3adf951e189fd3679125254f42797e3265f6d6 (patch) | |
tree | 977d9580a32617c635d8552cc8174d08e0a30558 /server/test | |
parent | d1ef53a6df439e238d8a6cccfb9e3d353c7b9973 (diff) | |
download | lua-language-server-2d3adf951e189fd3679125254f42797e3265f6d6.zip |
更新表的算法
Diffstat (limited to 'server/test')
-rw-r--r-- | server/test/definition/method.lua | 18 | ||||
-rw-r--r-- | server/test/definition/table.lua | 4 |
2 files changed, 20 insertions, 2 deletions
diff --git a/server/test/definition/method.lua b/server/test/definition/method.lua index 96b77a60..2829f5b7 100644 --- a/server/test/definition/method.lua +++ b/server/test/definition/method.lua @@ -21,3 +21,21 @@ end function mt:<!m4!>() end ]] + +TEST [[ +function mt:m3() + self:<?m4?>() +end +function mt:<!m4!>() +end +]] + +TEST [[ +local mt +mt.__index = mt +function mt:<!method1!>() +end + +local obj = setmetatable({}, mt) +obj:<?method1?>() +]] diff --git a/server/test/definition/table.lua b/server/test/definition/table.lua index 08c4c98e..b4585d16 100644 --- a/server/test/definition/table.lua +++ b/server/test/definition/table.lua @@ -97,7 +97,7 @@ t.<!after!> = a TEST[[ local t = { - <!x!> = 1, + <!insert!> = 1, } -t.<?x?>() +t.<?insert?>() ]] |