Module:Template test case: Difference between revisions
protect calling self._invocation:getOutput{...}
(protect call templateObj:getOutput()) |
(protect calling self._invocation:getOutput{...}) |
||
Line 156: | Line 156: | ||
function Template:getOutput() | function Template:getOutput() | ||
return self._invocation | local protect = require('Module:Protect') | ||
-- calling self._invocation:getOutput{...} | |||
return protect(self._invocation.getOutput)(self._invocation, { | |||
template = self:getName(), | template = self:getName(), | ||
requireMagicWord = self.requireMagicWord, | requireMagicWord = self.requireMagicWord, | ||
} | }) | ||
end | end | ||
Line 302: | Line 304: | ||
function TestCase:getTemplateOutput(templateObj) | function TestCase:getTemplateOutput(templateObj) | ||
local | local output = templateObj:getOutput() | ||
if self.options.resetRefs then | if self.options.resetRefs then | ||
mw.getCurrentFrame():extensionTag('references') | mw.getCurrentFrame():extensionTag('references') |