Difference between revisions of "Template:Category handler/testcases"

From blackwiki
Jump to navigation Jump to search
imported>Davidgothberg
(→‎Testing {{tl|cat handler}}: Testing "category=empty/no/not defined/¬/yes". Seems to work.)
imported>Plastikspork
(Delete)
 
(14 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
{{template test cases notice}}
 
{{template test cases notice}}
  
=== Testing {{tl|cat handler/numbered}} ===
+
=== Testing {{tl|category handler/blacklist}} ===
  
 
<pre>
 
<pre>
x{{cat handler/numbered}}x
+
x{{category handler/blacklist}}x
  
x{{cat handler/numbered
+
x{{category handler/blacklist
| 1 = a
+
| page = User talk:Example
| 2 = b
 
| 3 = c
 
| data = 3
 
 
}}x
 
}}x
  
x{{cat handler/numbered
+
x{{category handler/blacklist
| 1 = a
+
| page = User talk:Example/Archive 5
| 2 = b
 
| 3 = c
 
| data = Somecat
 
 
}}x
 
}}x
  
x{{cat handler/numbered
+
x{{category handler/blacklist
| 1 = a
+
| page = Wikipedia:Template messages/Wikipedia namespace
| 2 = b
 
| 3 = c
 
| data = [[Category:Test]]
 
 
}}x
 
}}x
 
</pre>
 
</pre>
x{{cat handler/numbered}}x
+
x{{category handler/blacklist}}x
  
x{{cat handler/numbered
+
x{{category handler/blacklist
| 1 = a
+
| page = User talk:Example
| 2 = b
 
| 3 = c
 
| data = 3
 
 
}}x
 
}}x
  
x{{cat handler/numbered
+
x{{category handler/blacklist
| 1 = a
+
| page = User talk:Example/Archive 5
| 2 = b
 
| 3 = c
 
| data = Somecat
 
 
}}x
 
}}x
  
x{{cat handler/numbered
+
x{{category handler/blacklist
| 1 = a
+
| page = Wikipedia:Template messages/Wikipedia namespace
| 2 = b
 
| 3 = c
 
| data = [[Category:Test]]
 
 
}}x
 
}}x
  
 
+
=== Testing {{tl|category handler}} ===
=== Testing {{tl|cat handler/blacklist}} ===
 
  
 
<pre>
 
<pre>
x{{cat handler/blacklist}}x
+
x{{category handler}}x
  
x{{cat handler/blacklist
+
x{{category handler
| page = User talk:Example
+
| Somecat
 
}}x
 
}}x
  
x{{cat handler/blacklist
+
x{{category handler
| page = User talk:Example/Archive 5
+
| template = Somecat
 
}}x
 
}}x
  
x{{cat handler/blacklist
+
x{{category handler
| page = Wikipedia:Template messages/Wikipedia namespace
+
| Somecat
 +
| page = Somearticle
 
}}x
 
}}x
 
</pre>
 
</pre>
x{{cat handler/blacklist}}x
+
x{{category handler}}x
  
x{{cat handler/blacklist
+
x{{category handler
| page = User talk:Example
+
| Somecat
 
}}x
 
}}x
  
x{{cat handler/blacklist
+
x{{category handler
| page = User talk:Example/Archive 5
+
| template = Somecat
 
}}x
 
}}x
  
x{{cat handler/blacklist
+
x{{category handler
| page = Wikipedia:Template messages/Wikipedia namespace
+
| Somecat
 +
| page = Somearticle
 
}}x
 
}}x
  
=== Testing {{tl|cat handler}} ===
+
 
  
 
<pre>
 
<pre>
x{{cat handler}}x
+
x{{category handler
 
 
x{{cat handler
 
 
| Somecat
 
| Somecat
 +
| page = File:Example/test
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler
| template = Somecat
+
| Somecat
 +
| page = File:Example/test
 +
| nocat =  
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler
 
| Somecat
 
| Somecat
| page = Somearticle
+
| page = File:Example/test
 +
| nocat = true
 
}}x
 
}}x
 
+
</pre>
x{{cat handler
+
x{{category handler
 
| Somecat
 
| Somecat
 
| page = File:Example/test
 
| page = File:Example/test
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler
 
| Somecat
 
| Somecat
 
| page = File:Example/test
 
| page = File:Example/test
Line 111: Line 96:
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler
 
| Somecat
 
| Somecat
 
| page = File:Example/test
 
| page = File:Example/test
 
| nocat = true
 
| nocat = true
 +
}}x
 +
 +
 +
 +
<pre>
 +
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
 +
</pre>
 +
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
 +
 +
 +
 +
<pre>
 +
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
 +
</pre>
 +
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
 +
 +
 +
 +
<pre>
 +
x{{category handler
 +
| other = Somecat
 +
| categories = no
 +
}}x
 +
 +
x{{category handler
 +
| other = Somecat
 +
| page = User talk:Example/Archive 5
 +
| categories = yes
 +
}}x
 +
</pre>
 +
x{{category handler
 +
| other = Somecat
 +
| categories = no
 +
}}x
 +
 +
x{{category handler
 +
| other = Somecat
 +
| page = User talk:Example/Archive 5
 +
| categories = yes
 +
}}x
 +
 +
 +
 +
<pre>
 +
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
 +
</pre>
 +
 +
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
 +
 +
=== Testing {{tl|category handler/sandbox}} ===
 +
 +
<pre>
 +
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
 
}}x
 
</pre>
 
</pre>
x{{cat handler}}x
+
x{{category handler/sandbox}}x
  
x{{cat handler
+
x{{category handler/sandbox
 
| Somecat
 
| Somecat
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler/sandbox
 
| template = Somecat
 
| template = Somecat
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler/sandbox
 
| Somecat
 
| Somecat
 
| page = Somearticle
 
| page = Somearticle
 
}}x
 
}}x
  
x{{cat handler
+
 
 +
 
 +
<pre>
 +
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
 +
</pre>
 +
x{{category handler/sandbox
 
| Somecat
 
| Somecat
 
| page = File:Example/test
 
| page = File:Example/test
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler/sandbox
 
| Somecat
 
| Somecat
 
| page = File:Example/test
 
| page = File:Example/test
Line 143: Line 351:
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler/sandbox
 
| Somecat
 
| Somecat
 
| page = File:Example/test
 
| page = File:Example/test
Line 152: Line 360:
  
 
<pre>
 
<pre>
x{{cat handler
+
x{{category handler/sandbox
 
| main = Category:Somecat1 Category:Somecat2
 
| main = Category:Somecat1 Category:Somecat2
 
| 1 = Category:Somecat3  <!--For help, user and template space-->
 
| 1 = Category:Somecat3  <!--For help, user and template space-->
Line 163: Line 371:
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler/sandbox
 
| main = Category:Somecat1 Category:Somecat2
 
| main = Category:Somecat1 Category:Somecat2
 
| 3 = Category:Somecat3  <!--For help, user and template space-->
 
| 3 = Category:Somecat3  <!--For help, user and template space-->
Line 174: Line 382:
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler/sandbox
 
| main = Category:Somecat1 Category:Somecat2
 
| main = Category:Somecat1 Category:Somecat2
 
| 3 = Category:Somecat3  <!--For help, user and template space-->
 
| 3 = Category:Somecat3  <!--For help, user and template space-->
Line 186: Line 394:
 
}}x
 
}}x
 
</pre>
 
</pre>
x{{cat handler
+
x{{category handler/sandbox
 
| main = Category:Somecat1 Category:Somecat2
 
| main = Category:Somecat1 Category:Somecat2
 
| 1 = Category:Somecat3  <!--For help, user and template space-->
 
| 1 = Category:Somecat3  <!--For help, user and template space-->
Line 197: Line 405:
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler/sandbox
 
| main = Category:Somecat1 Category:Somecat2
 
| main = Category:Somecat1 Category:Somecat2
 
| 3 = Category:Somecat3  <!--For help, user and template space-->
 
| 3 = Category:Somecat3  <!--For help, user and template space-->
Line 208: Line 416:
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler/sandbox
 
| main = Category:Somecat1 Category:Somecat2
 
| main = Category:Somecat1 Category:Somecat2
 
| 3 = Category:Somecat3  <!--For help, user and template space-->
 
| 3 = Category:Somecat3  <!--For help, user and template space-->
Line 223: Line 431:
  
 
<pre>
 
<pre>
x{{cat handler
+
x{{category handler/sandbox
 
| other = Somecat
 
| other = Somecat
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler/sandbox
 
| other = Somecat
 
| other = Somecat
 
| page = User talk:Example/Archive 5
 
| page = User talk:Example/Archive 5
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler/sandbox
 
| other = Somecat
 
| other = Somecat
 
| page = User talk:Example/Archive 5
 
| page = User talk:Example/Archive 5
Line 238: Line 446:
 
}}x
 
}}x
 
</pre>
 
</pre>
x{{cat handler
+
x{{category handler/sandbox
 
| other = Somecat
 
| other = Somecat
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler/sandbox
 
| other = Somecat
 
| other = Somecat
 
| page = User talk:Example/Archive 5
 
| page = User talk:Example/Archive 5
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler/sandbox
 
| other = Somecat
 
| other = Somecat
 
| page = User talk:Example/Archive 5
 
| page = User talk:Example/Archive 5
Line 256: Line 464:
  
 
<pre>
 
<pre>
x{{cat handler
+
x{{category handler/sandbox
 
| other = Somecat
 
| other = Somecat
 
| categories = no
 
| categories = no
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler/sandbox
 
| other = Somecat
 
| other = Somecat
 
| page = User talk:Example/Archive 5
 
| page = User talk:Example/Archive 5
Line 267: Line 475:
 
}}x
 
}}x
 
</pre>
 
</pre>
x{{cat handler
+
x{{category handler/sandbox
 
| other = Somecat
 
| other = Somecat
 
| categories = no
 
| categories = no
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler/sandbox
 
| other = Somecat
 
| other = Somecat
 
| page = User talk:Example/Archive 5
 
| page = User talk:Example/Archive 5
Line 281: Line 489:
  
 
<pre>
 
<pre>
x{{cat handler
+
x{{category handler/sandbox
 
| other = Somecat
 
| other = Somecat
| category = no
+
| category2 = no
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler/sandbox
 
| other = Somecat
 
| other = Somecat
| category =  
+
| category2 =  
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler/sandbox
 
| other = Somecat
 
| other = Somecat
| category = ¬
+
| category2 = ¬
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler/sandbox
 
| other = Somecat
 
| other = Somecat
| category = {{{category|¬}}}
+
| category2 = {{{category|¬}}}
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler/sandbox
 
| other = Somecat
 
| other = Somecat
 
| page = User talk:Example/Archive 5
 
| page = User talk:Example/Archive 5
| category = yes
+
| category2 = yes
 
}}x
 
}}x
 
</pre>
 
</pre>
x{{cat handler
+
 
 +
x{{category handler/sandbox
 
| other = Somecat
 
| other = Somecat
| category = no
+
| category2 = no
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler/sandbox
 
| other = Somecat
 
| other = Somecat
| category =  
+
| category2 =  
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler/sandbox
 
| other = Somecat
 
| other = Somecat
| category = ¬
+
| category2 = ¬
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler/sandbox
 
| other = Somecat
 
| other = Somecat
| category = {{{category|¬}}}
+
| category2 = {{{category|¬}}}
 
}}x
 
}}x
  
x{{cat handler
+
x{{category handler/sandbox
 
| other = Somecat
 
| other = Somecat
 
| page = User talk:Example/Archive 5
 
| page = User talk:Example/Archive 5
| category = yes
+
| category2 = yes
 +
}}x
 +
 
 +
=== Testing parameter 1 ===
 +
 
 +
<pre>
 +
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
 +
</pre>
 +
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
 +
 
 +
=== Testing the "all" parameter ===
 +
 
 +
<pre>
 +
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
 +
</pre>
 +
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
 +
 
 +
 
 +
 
 +
<pre>
 +
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
 +
</pre>
 +
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
 +
 
 +
 
 +
 
 +
=== Testing the "subpage" parameter ===
 +
 
 +
<pre>
 +
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
 +
</pre>
 +
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
 +
 
 +
 
 +
 
 +
<pre>
 +
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
 +
</pre>
 +
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
 +
 
 +
 
 +
 
 +
<pre>
 +
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
 +
</pre>
 +
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
 
}}x

Latest revision as of 17:33, 13 May 2017

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