コンテンツにスキップ

英文维基 | 中文维基 | 日文维基 | 草榴社区

モジュール:Navbar/testcases

--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')
require('strict') --make sure no globals

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