Jump to content

Module:Roman/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Andy M. Wang (talk | contribs) at 07:21, 23 April 2016 (much simpler). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
-- Unit tests for [[Module:Roman/sandbox]]. Click talk page to run tests.

local moduleName = 'Roman/sandbox' -- assigning this to a variable as it is later used to generate an #invoke statement.
local mainFuncName = 'main'
local mm = require('Module:' .. moduleName)
local p = require('Module:UnitTests')

function p.buildInvocation(functionName, args)
	args = args or {}
	return '{{#invoke:' .. moduleName .. '|' .. functionName .. unpack(args) .. '}}'
end

function p:test_preliminary()
	local argarray = {
		{},
		{},
	}
	
	local invoke = self.buildInvocation(mainFuncName, {'0'})
    self:preprocess_equals(invoke, 'N')
end

return p