Modul:Navbar/testniprimeri

Iz Wikipedije, proste enciklopedije
Jump to navigation Jump to search
--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('Modul:Navbar')
local ns = require('Modul:Navbar/peskovnik')
require('Modul:No globals') --make sure no globals

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