Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Module:Compact list/testcases

From Wikipedia, the free encyclopedia
-- Unit tests for [[Module:Compact list]]. Click talk page to run tests.
local p = require('Module:UnitTests')

function p:test()
	self:preprocess_equals_preprocess('{{#invoke:Compact list|main|ook|xxx=111}}','')
	self:preprocess_equals_preprocess('{{#invoke:Compact list|main|ook|ook=A|spud=1234}}','A')
	self:preprocess_equals_preprocess('{{#invoke:Compact list|main|ook|ook1=A|ook_2=B}}','{{hlist|A|B}}', {templatestyles=1})
	self:preprocess_equals_preprocess('{{#invoke:Compact list|main|ook|ook=A|ook0=B|ook30=C|fook=234}}','{{hlist|A|B|C}}', {templatestyles=1})
	self:preprocess_equals_preprocess('{{#invoke:Compact list|main|ook|ook=A|ook1=B|ook2=C|ook3=D}}','{{hlist|A|B|C|D}}', {templatestyles=1})
	self:preprocess_equals_preprocess('{{#invoke:Compact list|main|ook|ook1=A|ook5=B|ook20=C|ook3000=D|ook342345=E|ook234ttthh=234}}',
		'{{collapsible list|A|B|C|D|E}}', {templatestyles=1})
	self:preprocess_equals_preprocess('{{#invoke:Compact list|main|ook|ook1=A|ook5=B|ook20=C|ook3000=D|ook342345=E|ook234ttthh=234|_limit=5}}',
		'{{hlist|A|B|C|D|E}}', {templatestyles=1})
	self:preprocess_equals_preprocess('{{#invoke:Compact list|main|ook|ook=A|ook1=B|ook2=C|ook3=D|ook4=E|ook5=F|ook6=G|ook7=H|ook8=I|ook9=J}}',
		'{{collapsible list|A|B|C|D|E|F|G|H|I|J}}', {templatestyles=1})
end

return p