Naar inhoud springen

Module:Layout/Production/Test/Logo

Uit Wikibooks

(MediaWiki:Scribunto-doc-page-show)

 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 deze onderwijswiki beschikbaar.

De module wordt geïnitialiseerd met de configuratie in Module:Layout/Production/Configuration.
Controleer op scriptfouten, lintfouten of opmaak notificaties.
Yes The only test is ok.
NameExpectedActual
Yestest_Logo

local test = {};

local CFG      = require( "Module:Layout/Production/Configuration" );
local logo     = CFG.INCLUDE( "production", "logo" );
local unittest = CFG.INCLUDE( "production", "unittest" );
test = unittest:new();

function test.main( frame )
	return test.run( frame );
end

function test:test_Logo()
	local call = {};
	call.source = "Huma.JPG";
	local result1 = '<div>[[File:Huma.JPG|300px|Logo|center]]</div>';
    self:assertEquals( result1, logo.main( call )   , "Valid Huma.JPG" );
end

return test;
Informatie afkomstig van Wikibooks NL, een onderdeel van de Wikimedia Foundation.