Deze module is nog in ontwikkeling (versie 0.0) en wordt getest.
De Module:Layout is bedoeld om snel, consistent en uitgebreid een pagina op te maken.
Er is een op de module afgestemde handleiding over Lua Scribunto beschikbaar.
localtest={};localCFG=require("Module:Layout/Production/Configuration");CFG.CONFIGURATION_TESTS={"Include"};CFG.INTERFACE_TESTS={"Security"};CFG.LIBRARY_TESTS={"Array","Color","Pattern","Text","Timestamp"};CFG.MODEL_TESTS={"Call","Convert"};CFG.OBJECT_TESTS={"Logo"};CFG.TESTED_BY="Tested by module [[Module:Layout/Production/Test/%s]].<br>\n";CFG.TOTAL_OK="[[File:OOjs UI icon check-constructive.svg|20px|alt=Yes|link=]] The were no errors in the <b>%s</b> tests.\n";CFG.TOTAL_FAILED="[[File:OOjs UI icon close-ltr-destructive.svg|20px|link=|alt=]] The total errors are <b>%s</b> in <b>%s</b> tests.\n";CFG.TOTAL_TOTALS_OK="[[File:OOjs UI icon check-constructive.svg|20px|alt=Yes|link=]] All <b>%s</b> tests were succesfull!\n"CFG.TOTAL_TOTALS_FAILED="[[File:OOjs UI icon close-ltr-destructive.svg|20px|link=|alt=]] Of all <b>%s</b> tests <b>%s</b> have failed!\n"localenvironment="Production";functiontest.main(frame)localresult="";forindex,valueinipairs(frame.args)dolocaltestobject=CFG.INCLUDE("production","test/"..value);iftestobject~=nilandtestobject.main(frame)~=nilthenresult=result..testobject.main(frame);endendreturnresult;endfunctiontest.collection(frame,collection)localresult={};localtext="";localtotal_fail=0;localtotal_succes=0;forindex,valueinipairs(collection)doresult[value]={};localtestobject=CFG.INCLUDE("production","test/"..value);iftestobject~=nilandtestobject.main(frame)~=nilthenlocalwikitext,testdata=testobject.main(frame);text=text..string.format("==== %s ====\n",value);localtitle_path="Module:Layout/"..environment.."/Test/"..value;ifmw.title.new(title_path).existsthentext=text..string.format(CFG.TESTED_BY,value);endtext=text..wikitext.."\n";total_fail=total_fail+testdata.failureCount;total_succes=total_succes+testdata.successCount;endendlocalreport=string.format(CFG.TOTAL_OK,tostring(total_fail+total_succes));iftotal_fail~=0thenreport=string.format(CFG.TOTAL_FAILED,tostring(total_fail),tostring(total_fail+total_succes));endreturnreport..text,total_fail,total_succes;endfunctiontest.configuration(frame)returntest.collection(frame,CFG.CONFIGURATION_TESTS);endfunctiontest.interface(frame)returntest.collection(frame,CFG.INTERFACE_TESTS);endfunctiontest.library(frame)returntest.collection(frame,CFG.LIBRARY_TESTS);endfunctiontest.model(frame)returntest.collection(frame,CFG.MODEL_TESTS);endfunctiontest.object(frame)returntest.collection(frame,CFG.OBJECT_TESTS);endfunctiontest.total(frame)localtotal_fail,total_succes,fail,succes=0,0,0,0;localwikitext,text="","";text=text.."=== Configuration ===\n"wikitext,fail,succes=test.configuration(frame);total_fail=total_fail+fail;total_succes=total_succes+succes;text=text..wikitext.."\n";text=text.."=== Interface ===\n"wikitext,fail,succes=test.interface(frame);total_fail=total_fail+fail;total_succes=total_succes+succes;text=text..wikitext.."\n";text=text.."=== Library ===\n"wikitext,fail,succes=test.library(frame);total_fail=total_fail+fail;total_succes=total_succes+succes;text=text..wikitext.."\n";text=text.."=== Model ===\n"wikitext,fail,succes=test.model(frame);total_fail=total_fail+fail;total_succes=total_succes+succes;text=text..wikitext.."\n";text=text.."=== Object ===\n"wikitext,fail,succes=test.object(frame);total_fail=total_fail+fail;total_succes=total_succes+succes;text=text..wikitext.."\n";localreport=string.format(CFG.TOTAL_TOTALS_OK,tostring(total_succes+total_fail));iftotal_fail~=0thenreport=string.format(CFG.TOTAL_TOTALS_FAILED,tostring(total_succes+total_fail),tostring(total_fail));endreturn"== System ==\n"..report..text;endreturntest;