Jump to content

Module:Arguments/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mr. Stradivarius (talk | contribs) at 14:33, 9 December 2013 (test). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
local getArgs = require('Module:Arguments').getArgs
local ScribuntoUnit = require('Module:ScribuntoUnit')
local suite = ScribuntoUnit:new()

--[[
function suite:assertParameterEquals(expected, template, funcName, paraNum, message)
	self:assertTemplateEquals(expected, template, {
--]]

local p = {}

function p.main(frame)
	local args = getArgs(frame)
	return args[1]
end

function p.test()
	local frame = mw.getCurrentFrame()
	local mainVal = frame:preprocess('{{Module talk:Arguments/testInvoke|function=main}}')
	return mainVal
end

return p