Aller au contenu

Module:TestRequire

La bibliothèque libre.

La documentation pour ce module peut être créée à Module:TestRequire/Documentation

local p = {} -- TestRequire.lua

local TestpackG = require("Module:TestpackG")

function p.test(frame)
	local t = "\n* Test Module:Table2function.lua of module table as fonction: "
	t = t .. "\n* display if <b>ext</b> or if <b>Module</b>."
	t = t .. "\n* <b>In package.loaded:</b>"
	for key, modul in pairs(package.loaded) do
		t = t .. "<br>* " .. key .. " = <b>" .. type(modul) .. "</b>"
		if string.find(key, "ext") then t = t .. " . . . <b>this is a ext.</b>" end
		if string.find(key, "Module") then t = t .. " . . . <b>this is a Module.</b>" end
	end
	t = t .. "\n* <b>in _G:</b>"
	for key, modul in pairs(_G) do
		t = t .. "<br>* " .. key .. " = <b>" .. type(modul) .. "</b>"
		if string.find(key, "ext") then t = t .. " . . . <b>this is a ext.</b>" end
		if string.find(key, "Module") then t = t .. " . . . <b>this is a Module.</b>" end
	end
	return t
end

return p