Jump to content

Module:Flag/testcases: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
GKFX changed the content model of the page Module:Flag/testcases from "Scribunto" to "wikitext": These testcases are better suited to {{test case}} than the Lua unit test code.
Re-do testcases
Line 1: Line 1:
{{test case|_template=#invoke:Flag|_collapsible=y|_titlecode=y|athlete|[[Andy Murray]]|GBR}}
-- Unit tests for [[Module:{{ROOTPAGENAME}}]]. Click talk page to run tests.
{{test case|_template=#invoke:Flag|_collapsible=y|_titlecode=y|athlete|John Doe|France|code=FRA}}
local p = require('Module:UnitTests')
{{test case|_template=#invoke:Flag|_collapsible=y|_titlecode=y|main|Ireland}}

{{test case|_template=#invoke:Flag|_collapsible=y|_titlecode=y|country|Spain}}
-- Example unit test.
{{test case|_template=#invoke:Flag|_collapsible=y|_titlecode=y|deco|Italy}}
function p:test_athlete()
{{test case|_template=#invoke:Flag|_collapsible=y|_titlecode=y|icon|Germany}}
self:preprocess_equals_sandbox_many('{{#invoke:Flag', 'athlete', {
{{test case|_template=#invoke:Flag|_collapsible=y|_titlecode=y|+link|History of|Ukraine}}
{ "[[Andy Murray]]", "GBR" },
{ "John Smith", "Xanadu", code="XAN" },
}, {})
end

return p

Revision as of 12:32, 5 February 2023

{{#invoke:Flag|athlete|[[Andy Murray]]|GBR}}
{{#invoke:Flag|athlete|John Doe|France|code=FRA}}

{{#invoke:Flag}}

 John Doe (FRA)

{{#invoke:Flag/sandbox}}

 John Doe (FRA)

{{#invoke:Flag|country|Spain}}
{{#invoke:Flag|deco|Italy}}
{{#invoke:Flag|icon|Germany}}
{{#invoke:Flag|+link|History of|Ukraine}}