Module:Demo/testcases

local demo = require("Dev:Demo") local ScribuntoUnit = require("Module:ScribuntoUnit") local suite =require("Module:UnitTests") -- local suite = ScribuntoUnit:new local dbgFrame = require("Dev:FrameTools")

function suite:test_parser_parity local hiddenChar =string.char(127) local realFrame =mw.getCurrentFrame local currFrame = dbgFrame.makePseudoFrame(realFrame) local testOutput = realFrame:preprocess(" ") currFrame = currFrame:newChild{args={testOutput}} local frame = currFrame:newChild{} -- local pp = mw.getCurrentFrame.preprocess -- self:assertSameResult(demo.main(frame),    --     "   y" ) local sOutput = demo.main(frame) local sExpected = " &#123;&#123;#if:x&#124;y&#124;z&#125;&#125; y"    self:equals("test",sOutput, sExpected,{["nowiki"]=false} ) end

return suite