Difference between revisions of "Template:Main/testcases"

From blackwiki
Jump to navigation Jump to search
imported>DoebLoggs
m (Reverted edits by 174.252.194.118 (talk) to last version by Anthony Appleyard)
imported>Andrybak
(use Template:test case; add section headers)
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}}
+
{{test case|_format=inline|_showcode=yes|John|George}}
* <code><nowiki>{{Main|John|George}}</nowiki></code>
+
{{test case|_format=inline|_showcode=yes|John|George|Ringo}}
** {{Main|John|George}}
+
 
** {{Main/sandbox|John|George}}
+
=== Other namespaces links ===
* <code><nowiki>{{Main|John|George|Ringo}}</nowiki></code>
+
{{test case|_format=inline|_showcode=yes|:Category:John}}
** {{Main|John|George|Ringo}}
+
{{test case|_format=inline|_showcode=yes|Template:John|George}}
** {{Main/sandbox|John|George|Ringo}}
+
{{test case|_format=inline|_showcode=yes|Talk:John|George|Ringo}}
* <code><nowiki>{{Main|:Category:John}}</nowiki></code>
+
 
** {{Main|:Category:John}}
+
=== With anchor links ===
** {{Main/sandbox|:Category:John}}
+
{{test case|_format=inline|_showcode=yes|Lion#Etymology}}
* <code><nowiki>{{Main|Template:John|George}}</nowiki></code>
+
 
** {{Main|Template:John|George}}
+
=== Missing positional parameter ===
** {{Main/sandbox|Template:John|George}}
+
{{test case|_format=inline|_showcode=yes|John|}}
* <code><nowiki>{{Main|Talk:John|George|Ringo}}</nowiki></code>
+
 
** {{Main|Talk:John|George|Ringo}}
+
== Parameter l2 ==
** {{Main/sandbox|Talk:John|George|Ringo}}
+
{{test case|_format=inline|_showcode=yes|History of the United States|RMS Titanic|WindSeeker|l2=RMS ''Titanic''}}
* <code><nowiki>{{Main|History of the United States|RMS Titanic|WindSeeker|l2=RMS ''Titanic''}}</nowiki></code>
 
** {{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''}}
 
* <code><nowiki>{{Main|Lion#Etymology}}</nowiki></code>
 
** {{Main|Lion#Etymology}}
 
** {{Main/sandbox|Lion#Etymology}}
 
* <code><nowiki>{{Main|John|}}</nowiki></code>
 
** {{Main|John|}}
 
** {{Main/sandbox|John|}}
 

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