Jump to content

Module:Political party/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Gonnym (talk | contribs) at 09:31, 19 November 2021 (Created page with '-- Unit tests for Module:Political party. Click talk page to run tests. local p = require('Module:UnitTests') function p:test_01_bad_values() self:preprocess_equals_sandbox_many('{{#invoke:Political party', 'fetch', { {'Aaaaaaaaaaa|color', ''}, {'Aaaaaaaaaaa|shortname', ''}, {'aontú|color', '#44532A'}, }, {nowiki=1}) end function p:test_02_fallback_values() self:preprocess_equals_sandbox_many('{{#invoke:Political party', 'fetch', { {'...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
-- Unit tests for [[Module:Political party]]. Click talk page to run tests.
local p = require('Module:UnitTests')

function p:test_01_bad_values()
	self:preprocess_equals_sandbox_many('{{#invoke:Political party', 'fetch', {
		{'Aaaaaaaaaaa|color', ''},
		{'Aaaaaaaaaaa|shortname', ''},
		{'aontú|color', '#44532A'},
    }, {nowiki=1})
end

function p:test_02_fallback_values()
	self:preprocess_equals_sandbox_many('{{#invoke:Political party', 'fetch', {		
		{'Aontú|shortname', 'Aon'},
		{'Actual Equality|shortname', 'Actual Equality'},
		{'Actual Equality|abbr', 'Actual Equality'},
    }, {nowiki=1})
end

return p