diff options
Diffstat (limited to 'server/test/definition/method.lua')
-rw-r--r-- | server/test/definition/method.lua | 65 |
1 files changed, 34 insertions, 31 deletions
diff --git a/server/test/definition/method.lua b/server/test/definition/method.lua index ad9fea08..08b56f61 100644 --- a/server/test/definition/method.lua +++ b/server/test/definition/method.lua @@ -69,37 +69,40 @@ setmetatable(api, { __index = mt }) api:<?method1?>() ]] ---TEST [[ ---local mt ---function mt:x() --- self.<?init?>() ---end --- ---local obj = setmetatable({}, { __index = mt }) ---obj.<!init!> = 1 ---]] --- ---TEST [[ ---local mt ---function mt:x() --- self.<?init?>() ---end --- ---local obj = setmetatable({ <!init!> = 1 }, { __index = mt }) ---]] --- ---TEST [[ ---local mt ---function mt:x() --- self.a.<?out?>() ---end --- ---local obj = setmetatable({ --- a = { --- <!out!> = 1, --- } ---}, { __index = mt }) ---]] +TEST [[ +local mt +function mt:x() + self.<?init?>() +end + +local obj = setmetatable({}, { __index = mt }) +obj.<!init!> = 1 +obj:x() +]] + +TEST [[ +local mt +function mt:x() + self.<?init?>() +end + +local obj = setmetatable({ <!init!> = 1 }, { __index = mt }) +obj:x() +]] + +TEST [[ +local mt +function mt:x() + self.a.<?out?>() +end + +local obj = setmetatable({ + a = { + <!out!> = 1, + } +}, { __index = mt }) +obj:x() +]] TEST [[ local sm = setmetatable |