diff options
Diffstat (limited to 'test-beta/crossfile')
-rw-r--r-- | test-beta/crossfile/definition.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test-beta/crossfile/definition.lua b/test-beta/crossfile/definition.lua index fbeda828..c5601a1f 100644 --- a/test-beta/crossfile/definition.lua +++ b/test-beta/crossfile/definition.lua @@ -521,6 +521,31 @@ TEST { } } +TEST { + { + path = 'a.lua', + content = [[ + local mt = {} + mt.__index = mt + + function mt:<!add!>(a, b) + end + + return function () + return setmetatable({}, mt) + end + ]], + }, + { + path = 'b.lua', + content = [[ + local m = require 'a' + local obj = m() + obj:<?add?>() + ]] + }, +} + --TEST { -- { -- path = 'a.lua', |