Jump to content

Module:Disambiguation/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by MSGJ (talk | contribs) at 11:50, 15 May 2023 (Created page with '-- Unit tests for [[Module:{{ROOTPAGENAME}}]]. Click talk page to run tests. local p = require('Module:UnitTests') -- Example unit test. function p:test_1() self:preprocess_equals('{{#invoke:Disambiguation | isDisambiguationPage | Paris}}', '') self:preprocess_equals('{{#invoke:Disambiguation | isDisambiguationPage | New}}', 'yes') self:preprocess_equals('{{#invoke:Disambiguation | isDisambiguationPage | Black swan (disambiguation)}}', 'yes') end ret...'). 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:{{ROOTPAGENAME}}]]. Click talk page to run tests.
local p = require('Module:UnitTests')

-- Example unit test.
function p:test_1()
	self:preprocess_equals('{{#invoke:Disambiguation | isDisambiguationPage | Paris}}', '')
	self:preprocess_equals('{{#invoke:Disambiguation | isDisambiguationPage | New}}', 'yes')
	self:preprocess_equals('{{#invoke:Disambiguation | isDisambiguationPage | Black swan (disambiguation)}}', 'yes')
	
end

return p