コンテンツにスキップ

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

モジュール:Navbox/testcases

local p = require('Module:UnitTests')

function p:test_former()
    self:preprocess_equals_preprocess_many('{{Navbox/sandbox |', '}}', '{{#invoke:Navbox/sandbox|navbox|', '}}', {
        {''},
        {'name=SomeNavbox'},
        {'name=SomeNavbox |listclass=hlist'},
        {'name=SomeNavbox |listclass=hlist |title=SomeTitle |navbar=plain'},
        {'name=SomeNavbox |listclass=hlist |title=SomeTitle |navbar=off'},
        {'name=SomeNavbox |listclass=hlist |title=SomeTitle'},
        {[=[name=SomeNavbox |listclass=hlist |title=SomeTitle
        	|group1=A
        	|list1=
        	*[[1]]
        	*[[2]]
        	|group2=B
        	|list2=
        	*[[3]]
        	*[[4]]
        	|group3=C
        	|list3=
        	*[[5]]
        	*[[6]]
        	]=]},
        {[=[name=SomeNavbox |listclass=hlist |title=SomeTitle |state=autocollapse
        	|group1=A
        	|list1=
        	*[[1]]
        	*[[2]]
        	|group2=B
        	|list2=
        	*[[3]]
        	*[[4]]
        	|group3=C
        	|list3=
        	*[[5]]
        	*[[6]]
        	]=]},
        {[=[name=SomeNavbox |listclass=hlist |title=SomeTitle |state=collapsed
        	|group1=A
        	|list1=
        	*[[1]]
        	*[[2]]
        	|group2=B
        	|list2=
        	*[[3]]
        	*[[4]]
        	|group3=C
        	|list3=
        	*[[5]]
        	*[[6]]
        	]=]},
        {[=[name=SomeNavbox |listclass=hlist |title=SomeTitle |state=plain
        	|group1=A
        	|list1=
        	*[[1]]
        	*[[2]]
        	|group2=B
        	|list2=
        	*[[3]]
        	*[[4]]
        	|group3=C
        	|list3=
        	*[[5]]
        	*[[6]]
        	]=]},
        {[=[name=SomeNavbox |listclass=hlist |title=SomeTitle |state=off
        	|group1=A
        	|list1=
        	*[[1]]
        	*[[2]]
        	|group2=B
        	|list2=
        	*[[3]]
        	*[[4]]
        	|group3=C
        	|list3=
        	*[[5]]
        	*[[6]]
        	]=]},
        {[=[name=SomeNavbox |listclass=hlist |title=SomeTitle |state=uncollapsed
        	|group1=A
        	|list1=
        	*[[1]]
        	*[[2]]
        	|group2=B
        	|list2=
        	*[[3]]
        	*[[4]]
        	|group3=C
        	|list3=
        	*[[5]]
        	*[[6]]
        	]=]},
        {[=[name=SomeNavbox |listclass=hlist |title=SomeNavbo
        	|group1=A
        	|list1=
        	*[[1]]
        	*[[2]]
        	|group10=B
        	|list10=
        	*[[10]]
        	*[[20]]
        	|group100=C
        	|list100=
        	*[[100]]
        	*[[200]]
        	]=]},
        {[=[name=SomeNavbox |listclass=hlist |title=SomeTitle |border=child
        	|group1=A
        	|list1=
        	*[[1]]
        	*[[2]]
        	|group2=B
        	|list2=
        	*[[3]]
        	*[[4]]
        	|group3=C
        	|list3=
        	*[[5]]
        	*[[6]]
        	]=]},
        {[=[name=SomeNavbox |listclass=hlist |title=SomeTitle |titlegroup=TitleGroup
        	|group1=A
        	|list1=
        	*[[1]]
        	*[[2]]
        	|group2=B
        	|list2=
        	*[[3]]
        	*[[4]]
        	|group3=C
        	|list3=
        	*[[5]]
        	*[[6]]
        	]=]},
    }, {nowiki=1, templatestyles=1})
end

return p