Jump to content

Module:Navbar/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Galobtter (talk | contribs) at 07:14, 6 April 2018 (ugh). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
--Quick and few tests of using the _navbar function directly, as they won't be caught in tests of {{navbar}}
local p = {}
local n = require('Module:Navbar')
local ns = require('Module:Navbar/sandbox')

function p.main()
	out = {}
	for i = 1,2 do
		k = {'yes', ''}
		table.insert(out, {
		n._navbar({collapsible = k[i], template =  'V/doc'}),
		ns._navbar({collapsible = k[i], template = 'V/doc'}),
		'<br/>----',
		n._navbar({collapsible = k[i], template = 'V/doc', 'h', 'm', ''}),
		ns._navbar({collapsible = k[i], template = 'V/doc', 'h', 'm', ''}),
		'<br/>----',
		n._navbar({collapsible = k[i], 'V/doc', 'h', 'm'}),
		ns._navbar({collapsible = k[i], 'V/doc', 'h', 'm'})})
	end
	return table.concat(out[1])..table.concat(out[2])
end
return p