Template:Category handler/testcases

From blackwiki
Jump to navigation Jump to search

Testing {{category handler/blacklist}}

x{{category handler/blacklist}}x

x{{category handler/blacklist
| page = User talk:Example
}}x

x{{category handler/blacklist
| page = User talk:Example/Archive 5
}}x

x{{category handler/blacklist
| page = Wikipedia:Template messages/Wikipedia namespace
}}x

x-- This module contains the blacklist used by Module:Category handler. -- Pages that match Lua patterns in this list will not be categorised unless -- categorisation is explicitly requested.

return { '^Main Page$', -- don't categorise the main page.

-- Don't categorise the following pages or their subpages. -- "%f[/\0]" matches if the next character is "/" or the end of the string. '^Wikipedia:Cascade%-protected items%f[/\0]', '^User:UBX%f[/\0]', -- The userbox "template" space. '^User talk:UBX%f[/\0]',

-- Don't categorise subpages of these pages, but allow -- categorisation of the base page. '^Wikipedia:Template index/.*$',

-- Don't categorise archives. '/[aA]rchive', "^Wikipedia:Administrators' noticeboard/IncidentArchive%d+$", }x

x-- This module contains the blacklist used by Module:Category handler. -- Pages that match Lua patterns in this list will not be categorised unless -- categorisation is explicitly requested.

return { '^Main Page$', -- don't categorise the main page.

-- Don't categorise the following pages or their subpages. -- "%f[/\0]" matches if the next character is "/" or the end of the string. '^Wikipedia:Cascade%-protected items%f[/\0]', '^User:UBX%f[/\0]', -- The userbox "template" space. '^User talk:UBX%f[/\0]',

-- Don't categorise subpages of these pages, but allow -- categorisation of the base page. '^Wikipedia:Template index/.*$',

-- Don't categorise archives. '/[aA]rchive', "^Wikipedia:Administrators' noticeboard/IncidentArchive%d+$", }x

x-- This module contains the blacklist used by Module:Category handler. -- Pages that match Lua patterns in this list will not be categorised unless -- categorisation is explicitly requested.

return { '^Main Page$', -- don't categorise the main page.

-- Don't categorise the following pages or their subpages. -- "%f[/\0]" matches if the next character is "/" or the end of the string. '^Wikipedia:Cascade%-protected items%f[/\0]', '^User:UBX%f[/\0]', -- The userbox "template" space. '^User talk:UBX%f[/\0]',

-- Don't categorise subpages of these pages, but allow -- categorisation of the base page. '^Wikipedia:Template index/.*$',

-- Don't categorise archives. '/[aA]rchive', "^Wikipedia:Administrators' noticeboard/IncidentArchive%d+$", }x

x-- This module contains the blacklist used by Module:Category handler. -- Pages that match Lua patterns in this list will not be categorised unless -- categorisation is explicitly requested.

return { '^Main Page$', -- don't categorise the main page.

-- Don't categorise the following pages or their subpages. -- "%f[/\0]" matches if the next character is "/" or the end of the string. '^Wikipedia:Cascade%-protected items%f[/\0]', '^User:UBX%f[/\0]', -- The userbox "template" space. '^User talk:UBX%f[/\0]',

-- Don't categorise subpages of these pages, but allow -- categorisation of the base page. '^Wikipedia:Template index/.*$',

-- Don't categorise archives. '/[aA]rchive', "^Wikipedia:Administrators' noticeboard/IncidentArchive%d+$", }x

Testing {{category handler}}

x{{category handler}}x

x{{category handler
| Somecat
}}x

x{{category handler
| template = Somecat
}}x

x{{category handler
| Somecat
| page = Somearticle
}}x

xx

xx

xSomecatx

xSomecatx


x{{category handler
| Somecat
| page = File:Example/test
}}x

x{{category handler
| Somecat
| page = File:Example/test
| nocat = 
}}x

x{{category handler
| Somecat
| page = File:Example/test
| nocat = true
}}x

xSomecatx

xSomecatx

xx


x{{category handler
| main = Category:Somecat1 Category:Somecat2
| 1 = Category:Somecat3   <!--For help, user and template space-->
| help = 1
| user = 1
| template = 1
| talk =     <!--No categories on talk pages-->
| other = Category:Somecat4   <!--For all other namespaces-->
| nocat = {{{nocat|}}}   <!--So "nocat=true/false" works-->
}}x

x{{category handler
| main = Category:Somecat1 Category:Somecat2
| 3 = Category:Somecat3   <!--For help, user and template space-->
| help = 3
| user = 3
| template = 3
| talk =     <!--No categories on talk pages-->
| other = Category:Somecat4   <!--For all other namespaces-->
| nocat = {{{nocat|}}}   <!--So "nocat=true/false" works-->
}}x

x{{category handler
| main = Category:Somecat1 Category:Somecat2
| 3 = Category:Somecat3   <!--For help, user and template space-->
| help = 3
| user = 3
| template = 3
| talk =     <!--No categories on talk pages-->
| other = Category:Somecat4   <!--For all other namespaces-->
| nocat = {{{nocat|}}}   <!--So "nocat=true/false" works-->
| page = Somearticle
}}x

xCategory:Somecat3x

xCategory:Somecat3x

xCategory:Somecat1 Category:Somecat2x


x{{category handler
| other = Somecat
}}x

x{{category handler
| other = Somecat
| page = User talk:Example/Archive 5
}}x

x{{category handler
| other = Somecat
| page = User talk:Example/Archive 5
| nocat = false
}}x

xSomecatx

xx

xSomecatx


x{{category handler
| other = Somecat
| categories = no
}}x

x{{category handler
| other = Somecat
| page = User talk:Example/Archive 5
| categories = yes
}}x

xx

xSomecatx


x{{category handler
| other = Somecat
| category2 = no
}}x

x{{category handler
| other = Somecat
| category2 = 
}}x

x{{category handler
| other = Somecat
| category2 = ¬
}}x

x{{category handler
| other = Somecat
| category2 = {{{category|¬}}}
}}x

x{{category handler
| other = Somecat
| page = User talk:Example/Archive 5
| category2 = yes
}}x

xx

xx

xSomecatx

xSomecatx

xSomecatx

Testing {{category handler/sandbox}}

x{{category handler/sandbox}}x

x{{category handler/sandbox
| Somecat
}}x

x{{category handler/sandbox
| template = Somecat
}}x

x{{category handler/sandbox
| Somecat
| page = Somearticle
}}x

xx

xx

xSomecatx

xSomecatx


x{{category handler/sandbox
| Somecat
| page = File:Example/test
}}x

x{{category handler/sandbox
| Somecat
| page = File:Example/test
| nocat = 
}}x

x{{category handler/sandbox
| Somecat
| page = File:Example/test
| nocat = true
}}x

xSomecatx

xSomecatx

xx


x{{category handler/sandbox
| main = Category:Somecat1 Category:Somecat2
| 1 = Category:Somecat3   <!--For help, user and template space-->
| help = 1
| user = 1
| template = 1
| talk =     <!--No categories on talk pages-->
| other = Category:Somecat4   <!--For all other namespaces-->
| nocat = {{{nocat|}}}   <!--So "nocat=true/false" works-->
}}x

x{{category handler/sandbox
| main = Category:Somecat1 Category:Somecat2
| 3 = Category:Somecat3   <!--For help, user and template space-->
| help = 3
| user = 3
| template = 3
| talk =     <!--No categories on talk pages-->
| other = Category:Somecat4   <!--For all other namespaces-->
| nocat = {{{nocat|}}}   <!--So "nocat=true/false" works-->
}}x

x{{category handler/sandbox
| main = Category:Somecat1 Category:Somecat2
| 3 = Category:Somecat3   <!--For help, user and template space-->
| help = 3
| user = 3
| template = 3
| talk =     <!--No categories on talk pages-->
| other = Category:Somecat4   <!--For all other namespaces-->
| nocat = {{{nocat|}}}   <!--So "nocat=true/false" works-->
| page = Somearticle
}}x

xCategory:Somecat3x

xCategory:Somecat3x

xCategory:Somecat1 Category:Somecat2x


x{{category handler/sandbox
| other = Somecat
}}x

x{{category handler/sandbox
| other = Somecat
| page = User talk:Example/Archive 5
}}x

x{{category handler/sandbox
| other = Somecat
| page = User talk:Example/Archive 5
| nocat = false
}}x

xSomecatx

xx

xSomecatx


x{{category handler/sandbox
| other = Somecat
| categories = no
}}x

x{{category handler/sandbox
| other = Somecat
| page = User talk:Example/Archive 5
| categories = yes
}}x

xx

xSomecatx


x{{category handler/sandbox
| other = Somecat
| category2 = no
}}x

x{{category handler/sandbox
| other = Somecat
| category2 = 
}}x

x{{category handler/sandbox
| other = Somecat
| category2 = ¬
}}x

x{{category handler/sandbox
| other = Somecat
| category2 = {{{category|¬}}}
}}x

x{{category handler/sandbox
| other = Somecat
| page = User talk:Example/Archive 5
| category2 = yes
}}x

xx

xx

xSomecatx

xSomecatx

xSomecatx

Testing parameter 1

x{{category handler
| 2 = Category:Somecat
| main = 
| wikipedia = 2
| page = Help:Example
}}x

x{{category handler
| 1 = Category:Somecat
| main = 
| wikipedia = 1
| page = Help:Example
}}x

x{{category handler/sandbox
| 1 = Category:Somecat
| main = 
| wikipedia = 1
| page = Help:Example
}}x

xx

xx

xx

Testing the "all" parameter

x{{category handler/sandbox
| all = Category:Somecat1     <!--Category for all namespaces-->
| main = Category:Somecat2    <!--And use this in main space-->
| talk =           <!--But no extra category for talk pages-->
}}x

x{{category handler/sandbox
| all = Category:Somecat1     <!--Category for all namespaces-->
| main = Category:Somecat2    <!--And use this in main space-->
| talk =           <!--But no extra category for talk pages-->
| page = An article
}}x

x{{category handler/sandbox
| all = Category:Somecat1     <!--Category for all namespaces-->
| main = Category:Somecat2    <!--And use this in main space-->
| talk =           <!--But no extra category for talk pages-->
| page = Talk:Example
}}x

xCategory:Somecat1x

xCategory:Somecat1Category:Somecat2x

xCategory:Somecat1x


x{{category handler/sandbox
| all = Category:Somecat1     <!--Category for all namespaces-->
| main = Category:Somecat2    <!--And use this in main space-->
| other = Category:Somecat3   <!--For the rest of the namespaces-->
| talk =           <!--But no extra category for talk pages-->
}}x

x{{category handler/sandbox
| all = Category:Somecat1     <!--Category for all namespaces-->
| main = Category:Somecat2    <!--And use this in main space-->
| talk =           <!--But no extra category for talk pages-->
| other = Category:Somecat3   <!--For the rest of the namespaces-->
| page = An article
}}x

x{{category handler/sandbox
| all = Category:Somecat1     <!--Category for all namespaces-->
| main = Category:Somecat2    <!--And use this in main space-->
| talk =           <!--But no extra category for talk pages-->
| other = Category:Somecat3   <!--For the rest of the namespaces-->
| page = Talk:Example
}}x

xCategory:Somecat1Category:Somecat3x

xCategory:Somecat1Category:Somecat2x

xCategory:Somecat1x


Testing the "subpage" parameter

x{{category handler/sandbox
| main = Category:Somecat1
| other = Category:Somecat2
| subpage = no
}}x

x{{category handler/sandbox
| main = Category:Somecat1
| other = Category:Somecat2
| subpage = no
| page = User:Example
}}x

x{{category handler/sandbox
| main = Category:Somecat1
| other = Category:Somecat2
| subpage = no
| page = User:Example/test
}}x

xx

xCategory:Somecat2x

xx


x{{category handler/sandbox
| main = Category:Somecat1
| other = Category:Somecat2
| subpage = only
}}x

x{{category handler/sandbox
| main = Category:Somecat1
| other = Category:Somecat2
| subpage = only
| page = User:Example
}}x

x{{category handler/sandbox
| main = Category:Somecat1
| other = Category:Somecat2
| subpage = only
| page = User:Example/test
}}x

xCategory:Somecat2x

xx

xCategory:Somecat2x


x{{category handler
| main = Category:Somecat1
| other = Category:Somecat2
| subpage = no
| page = User:Example
}}x

x{{category handler
| main = Category:Somecat1
| other = Category:Somecat2
| subpage = no
| page = User:Example/test
}}x

x{{category handler
| main = Category:Somecat1
| other = Category:Somecat2
| subpage = only
| page = User:Example/test
}}x

xCategory:Somecat2x

xx

xCategory:Somecat2x