Die Dokumentation für dieses Modul kann unter Modul:LuaTest/Doku erstellt werden

-- modul construction
local messagePrefix = "lua-module-LuaTest-"
local lua_access = {}
local template_access = {}

-- FUNCTIONS
-- lua_test
local function lua_test(module, func, expectation, arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6, arg_7, arg_8, arg_9)
	template = "{{#invoke:" .. module .. "|" .. func .. ""
	if arg_0 and arg_0 ~= "" then
		template = template .. "|" .. arg_0
	end
	if arg_1 and arg_1 ~= "" then
		template = template .. "|" .. arg_1
	end
	if arg_2 and arg_2 ~= "" then
		template = template .. "|" .. arg_2
	end
	if arg_3 and arg_3 ~= "" then
		template = template .. "|" .. arg_3
	end
	if arg_4 and arg_4 ~= "" then
		template = template .. "|" .. arg_4
	end
	if arg_5 and arg_5 ~= "" then
		template = template .. "|" .. arg_5
	end
	if arg_6 and arg_6 ~= "" then
		template = template .. "|" .. arg_6
	end
	if arg_7 and arg_7 ~= "" then
		template = template .. "|" .. arg_7
	end
	if arg_8 and arg_8 ~= "" then
		template = template .. "|" .. arg_8
	end
	if arg_9 and arg_9 ~= "" then
		template = template .. "|" .. arg_9
	end
	template = template .. "}}"
	frame = mw.getCurrentFrame()
	result = frame:preprocess(template)
	return "|-\n|" .. frame:callParserFunction( '#tag:nowiki', template ) .. "||" .. expectation .. "||" .. result
end

function template_access.lua_test( frame )
	return lua_test(frame.args.module, frame.args.func, frame.args.expect,
		frame.args.arg_0, frame.args.arg_1, frame.args.arg_2,
		frame.args.arg_3, frame.args.arg_4, frame.args.arg_5,
		frame.args.arg_6, frame.args.arg_7, frame.args.arg_8, frame.args.arg_9)
end 
-- END lua_test
-- Provide modul access
function template_access.modul()
    return lua_access
end

return template_access