FANDOM


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("<nowiki>{{#if:x|y|z}}</nowiki>")
    currFrame = currFrame:newChild{args={testOutput}}
    local frame = currFrame:newChild{}
    -- local pp = mw.getCurrentFrame().preprocess
    -- self:assertSameResult(demo.main(frame), 
    --     "<pre>{{#if:x|y|z}}</pre><br>y" )
    local sOutput = demo.main(frame)
    local sExpected = "<pre>&#123;&#123;#if:x&#124;y&#124;z&#125;&#125;</pre><br>y"
    self:equals("test",sOutput, sExpected,{["nowiki"]=false} )
end
 
return suite

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.