Jump to content

Module:Sensitive IP addresses/blocktext/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mr. Stradivarius (talk | contribs) at 06:45, 8 October 2018 (create test cases page for Module:Sensitive IP addresses/blocktext). 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:Sensitive IP addresses/blocktext]]

local mBlockText = require('Module:Sensitive IP addresses/blocktext')
local ScribuntoUnit = require('Module:ScribuntoUnit')
local suite = ScribuntoUnit:new()

function suite:test_parse_special_block_with_ipv4_address()
	self:assertEquals(
		mBlockText.parsePageName('Special:Block/1.2.3.4'),
		'1.2.3.4',
		"'Special:Block/1.2.3.4' parsed as '1.2.3.4'"
	)
end

return suite