Jump to content

Module:Template invocation/testcases: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
Not an example
Line 1: Line 1:
-- Example Unit tests for [[Module:Template invocation]]. Click talk page to run tests.
-- Unit tests for [[Module:Template invocation]]. Click talk page to run tests.
local p = require('Module:UnitTests')
local p = require('Module:UnitTests')
local protect = require('Module:Protect')
local protect = require('Module:Protect')

Revision as of 21:22, 10 February 2020

-- Unit tests for [[Module:Template invocation]]. Click talk page to run tests.
local p = require('Module:UnitTests')
local protect = require('Module:Protect')

function p:test_hello()
	local mTemplateInvocation = require('Module:Template invocation')
	local mTemplateInvocation2 = require('Module:Template invocation/sandbox')
	local a = {'bar', 'baz', abc = 'def'}; a[6]=666; a[7]=777; a['7']='777s'; a[3]=333; a['4']='444s'
	return protect(mTemplateInvocation.invocation)('foo', a) .. protect(mTemplateInvocation2.invocation)('foo', a)
end

return p