Difference between revisions of "Template:Film date/testcases"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
(update tests)
imported>Cobaltcigs
(tests)
Line 3: Line 3:
 
Set {{para|demospace|main}} to view/set outputted categories for the mainspace.
 
Set {{para|demospace|main}} to view/set outputted categories for the mainspace.
  
==1991==
+
==YYYY==
 
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
| 1 = 1991
+
|1979}}
| 2 = 3
+
 
| 3 = 23
+
==YYYY|MM==
| 4 = Premiere
+
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
| 5 = 1991
+
|1966|9}}
| 6 = 6
+
 
| 7 = 30
+
==YYYY|MM|DD==
| 8 = United States
+
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
}}
+
|1969|4|20}}
 +
 
 +
==XX==
 +
(intentionally blank output with no date numbers)
 +
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 +
|Antarctica}}
 +
 
 +
==YYYY|||XX==
 +
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 +
|1975|||Italy}}
 +
 
 +
==YYYY|XX==
 +
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 +
|1975|Italy}}
  
 +
==YYYY|MM||XX==
 
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
| 1 = 1991
+
|1934|6||France}}
| 2 = 3
 
| 3 =
 
| 4 = USA
 
}}
 
  
==2016==
+
==YYYY|MM|XX==
 
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
| 1 = 2016
+
|1934|6|France}}
| 2 = 6
 
| 3 = 13
 
}}
 
  
 +
==YYYY|MM|DD|XX==
 
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
| 1 = 2016
+
|2001|9|11|New York City}}
| 2 = 6
 
| 3 =
 
| 4 = USA
 
}}
 
  
==2017==
+
==Ignoring too many numbers==
{{Test case nowiki |format=columns |collapsible=yes |output=nowiki+ |showcode=no |titlecode=yes
+
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
|code=<nowiki>{{__TEMPLATENAME__|2017|1|1|TV=y}}</nowiki>
+
|2002|7|7|7|7|7|7|Anchorage, AK}}
}}
 
  
{{Test case nowiki |format=columns |collapsible=yes |output=nowiki+ |showcode=no |titlecode=yes
+
==More than 5, in mixed chronological order, plus some whitespace==
|code=<nowiki>{{__TEMPLATENAME__|2017|3||USA|TV=y}}</nowiki>
+
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 +
  |2007|8|9|Kenya
 +
  |2011|||Estonia
 +
  |2003|4|5|Ukraine
 +
  |2001|2|3|France
 +
  |2009|10||Madagascar
 +
  |2005|6|7|Chile
 
}}
 
}}
 
+
===with parameters skipped rather than blank===
==2155==
+
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
{{Test case nowiki |format=columns |collapsible=yes |output=nowiki+ |showcode=no |titlecode=yes
+
  |2007|8|9|Kenya
|code=<nowiki>{{__TEMPLATENAME__|2155|11|18|df=y}}</nowiki>
+
  |2011|Estonia
 +
  |2003|4|5|Ukraine
 +
  |2001|2|3|France
 +
  |2009|10|Madagascar
 +
  |2005|6|7|Chile
 
}}
 
}}
  
{{Test case nowiki |format=columns |collapsible=yes |output=nowiki+ |showcode=no |titlecode=yes
+
===with additional degenerate input===
|code=<nowiki>{{__TEMPLATENAME__|2155|11||USA|df=y}}</nowiki>
+
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 +
  |2007|8|9|Kenya
 +
  <!-- no date --> |Vatican City
 +
  |2011|Estonia
 +
  |2003|4|5|Ukraine
 +
  <!-- no date --> |North Korea
 +
  |2001|2|3|France
 +
  <!-- no date --> |Trinidad and Tobago
 +
  |2009|10|Madagascar
 +
  |2005|6|7|Chile
 
}}
 
}}

Revision as of 12:14, 7 February 2020

Set |demospace=main to view/set outputted categories for the mainspace.

YYYY

Template:Testcase table

YYYY|MM

Template:Testcase table

YYYY|MM|DD

Template:Testcase table

XX

(intentionally blank output with no date numbers) Template:Testcase table

YYYY|||XX

Template:Testcase table

YYYY|XX

Template:Testcase table

YYYY|MM||XX

Template:Testcase table

YYYY|MM|XX

Template:Testcase table

YYYY|MM|DD|XX

Template:Testcase table

Ignoring too many numbers

Template:Testcase table

More than 5, in mixed chronological order, plus some whitespace

Template:Testcase table

with parameters skipped rather than blank

Template:Testcase table

with additional degenerate input

Template:Testcase table