Jump to content

Module:Sandbox/Kephir

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Kephir (talk | contribs) at 16:54, 28 June 2013. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
-- [[User:Kephir]]'s Scribunto sandbox
-- do not expect anything to stay here in place

return {
	argtest = function (frame)
		local result = ''
		for key, value in ipairs(frame:getParent().args) do
			result = result .. key .. '=' .. value .. '<br/>'
		end
		return result
	end,
	templtest = function (frame)
		return '{{X1}} <b>X1</b> [[Template:X1]] [[:Category:X1]] [[Category:X1]]', 'Kaboom!'
	end,
	recurtest = function (frame)
		return 'Il a dit: »' .. frame.args[1] .. '«.'
	end,
	writetest = function (frame)
		local result = ''
		result = result .. frame.args[1] .. '<br/>'
		frame.args[1] = nil
		result = result .. frame.args[1] .. '<br/>'
		return result
	end,
	looptest = function (frame)
		while true do
			-- nothing
		end
	end
}