Difference between revisions of "Template:Main/testcases"

From blackwiki
Jump to navigation Jump to search
imported>Anthony Appleyard
m (Anthony Appleyard moved page Template:Main article/testcases to Template:Main/testcases over redirect: [https://en.wikipedia.org/wiki/Template_talk:Main_article#edittemplateprotected])
imported>Andrybak
m (add whitespace for readability)
 
(3 intermediate revisions by 3 users not shown)
Line 3: Line 3:
 
The first output example in each pair is the main template, and second is the sandbox.
 
The first output example in each pair is the main template, and second is the sandbox.
  
*<code><nowiki>{{Main|category=false}}</nowiki></code>
+
== Parameter category ==
** {{Main|category=false}}
+
{{test case|_format=inline|_showcode=yes|category=false}}
** {{Main/sandbox|category=false}}
+
 
* <code><nowiki>{{Main|John}}</nowiki></code>
+
== Positional parameters ==
** {{Main|John}}
+
{{test case|_format=inline|_showcode=yes|John}}
** {{Main/sandbox|John}}
+
 
* <code><nowiki>{{Main|John|George}}</nowiki></code>
+
{{test case|_format=inline|_showcode=yes|John|George}}
** {{Main|John|George}}
+
 
** {{Main/sandbox|John|George}}
+
{{test case|_format=inline|_showcode=yes|John|George|Ringo}}
* <code><nowiki>{{Main|John|George|Ringo}}</nowiki></code>
+
 
** {{Main|John|George|Ringo}}
+
=== Other namespaces links ===
** {{Main/sandbox|John|George|Ringo}}
+
{{test case|_format=inline|_showcode=yes|:Category:John}}
* <code><nowiki>{{Main|:Category:John}}</nowiki></code>
+
 
** {{Main|:Category:John}}
+
{{test case|_format=inline|_showcode=yes|Template:John|George}}
** {{Main/sandbox|:Category:John}}
+
 
* <code><nowiki>{{Main|Template:John|George}}</nowiki></code>
+
{{test case|_format=inline|_showcode=yes|Talk:John|George|Ringo}}
** {{Main|Template:John|George}}
+
 
** {{Main/sandbox|Template:John|George}}
+
=== With anchor links ===
* <code><nowiki>{{Main|Talk:John|George|Ringo}}</nowiki></code>
+
{{test case|_format=inline|_showcode=yes|Lion#Etymology}}
** {{Main|Talk:John|George|Ringo}}
+
 
** {{Main/sandbox|Talk:John|George|Ringo}}
+
=== Missing positional parameter ===
* <code><nowiki>{{Main|History of the United States|RMS Titanic|WindSeeker|l2=RMS ''Titanic''}}</nowiki></code>
+
{{test case|_format=inline|_showcode=yes|John|}}
** {{Main|History of the United States|RMS Titanic|WindSeeker|l2=RMS ''Titanic''}}
+
 
** {{Main/sandbox|History of the United States|RMS Titanic|WindSeeker|l2=RMS ''Titanic''}}
+
== Parameter l2 ==
* <code><nowiki>{{Main|Lion#Etymology}}</nowiki></code>
+
{{test case|_format=inline|_showcode=yes|History of the United States|RMS Titanic|WindSeeker|l2=RMS ''Titanic''}}
** {{Main|Lion#Etymology}}
 
** {{Main/sandbox|Lion#Etymology}}
 
* <code><nowiki>{{Main|John|}}</nowiki></code>
 
** {{Main|John|}}
 
** {{Main/sandbox|John|}}
 

Latest revision as of 22:04, 8 May 2020

Template:Test cases

The first output example in each pair is the main template, and second is the sandbox.

Parameter category

Positional parameters

  • {{Main|John}}
  • {{Main/sandbox|John}}


  • {{Main|John|George}}
  • {{Main/sandbox|John|George}}


Other namespaces links



With anchor links

Missing positional parameter

  • {{Main|John|}}
  • {{Main/sandbox|John|}}

Parameter l2