Difference between revisions of "Template:CodeFedReg/testcases"

From blackwiki
Jump to navigation Jump to search
imported>Int21h
(sandbox)
imported>Gurnec
(Test new arguments and special cases; remove obsolete tests (all C.F.R. titles now have articles on Wikipedia))
Line 3: Line 3:
 
== Testing main template ==
 
== Testing main template ==
  
=== Title exists on Wikipedia ===
+
=== No part argument provided ===
 
;<code><nowiki>{{</nowiki>CodeFedReg/sandbox<nowiki>|47}}</nowiki></code> &mdash; title only
 
;<code><nowiki>{{</nowiki>CodeFedReg/sandbox<nowiki>|47}}</nowiki></code> &mdash; title only
 
:{{CodeFedReg/sandbox|47}}
 
:{{CodeFedReg/sandbox|47}}
 +
 +
;<code><nowiki>{{</nowiki>CodeFedReg/sandbox<nowiki>|47|volume=5}}</nowiki></code> &mdash; title+volume
 +
:{{CodeFedReg/sandbox|47|volume=5}}
 +
 +
;<code><nowiki>{{</nowiki>CodeFedReg/sandbox<nowiki>|47|chapter=I}}</nowiki></code> &mdash; title+chapter
 +
:{{CodeFedReg/sandbox|47|chapter=I}}
 +
 +
;<code><nowiki>{{</nowiki>CodeFedReg/sandbox<nowiki>|47|chapter=I|subchapter=D}}</nowiki></code> &mdash; title+chapter+subchapter
 +
:{{CodeFedReg/sandbox|47|chapter=I|subchapter=D}}
  
 
=== Title XXX CFR Part YYY exists as a Wikipedia article ===
 
=== Title XXX CFR Part YYY exists as a Wikipedia article ===
Line 33: Line 42:
 
:{{CodeFedReg/sandbox|47|73|subpart=H|1650}}
 
:{{CodeFedReg/sandbox|47|73|subpart=H|1650}}
  
=== No part of title exists on Wikipedia ===
+
=== Appendices and other special sections ===
;<code><nowiki>{{</nowiki>CodeFedReg/sandbox<nowiki>|37}}</nowiki></code> &mdash; title only
+
;<code><nowiki>{{</nowiki>CodeFedReg/sandbox<nowiki>|40|88|104-94}}</nowiki></code> &mdash; title+part+section containing a dash
:{{CodeFedReg/sandbox|37}}
+
:{{CodeFedReg/sandbox|40|88|104-94}}
 
 
;<code><nowiki>{{</nowiki>CodeFedReg/sandbox<nowiki>|37|401}}</nowiki></code> &mdash; title+part only
 
:{{CodeFedReg/sandbox|37|401}}
 
  
;<code><nowiki>{{</nowiki>CodeFedReg/sandbox<nowiki>|37|401|16}}</nowiki></code> &mdash; title+part+section (and no subpart)
+
;<code><nowiki>{{</nowiki>CodeFedReg/sandbox<nowiki>|14|121|appendix=.0000_0nbspnbspnbsp.k|appendix_desc=Appendix K}}</nowiki></code> &mdash; title+part+appendix
:{{CodeFedReg/sandbox|37|401|16}}
+
:{{CodeFedReg/sandbox|14|121|appendix=.0000_0nbspnbspnbsp.k|appendix_desc=Appendix K}}
  
;<code><nowiki>{{</nowiki>CodeFedReg/sandbox<nowiki>|34|200|subpart=C}}</nowiki></code> &mdash; title+part+subpart and no section
+
;<code><nowiki>{{</nowiki>CodeFedReg/sandbox<nowiki>|14|91|appendix=.2|appendix_desc=SFAR 60}}</nowiki></code> &mdash; title+part+special section
:{{CodeFedReg/sandbox|34|200|subpart=C}}
+
:{{CodeFedReg/sandbox|14|91|appendix=.2|appendix_desc=SFAR 60}}
  
;<code><nowiki>{{</nowiki>CodeFedReg/sandbox<nowiki>|34|200|subpart=C|83}}</nowiki></code> &mdash; both subpart and section given, so section should override in link
+
=== Deprecated unusual prefixed section IDs ===
:{{CodeFedReg/sandbox|34|200|subpart=C|83}}
+
Displays as it did before but now links only to the part.
  
=== Unusual prefixed section IDs ===
 
 
;<code><nowiki>{{</nowiki>CodeFedReg/sandbox<nowiki>|14|91|prefix=SFAR|60}}</nowiki></code> &mdash; oddly prefixed section given
 
;<code><nowiki>{{</nowiki>CodeFedReg/sandbox<nowiki>|14|91|prefix=SFAR|60}}</nowiki></code> &mdash; oddly prefixed section given
 
:{{CodeFedReg/sandbox|14|91|prefix=SFAR|60}}
 
:{{CodeFedReg/sandbox|14|91|prefix=SFAR|60}}

Revision as of 20:26, 28 February 2019

Testing main template

No part argument provided

{{CodeFedReg/sandbox|47}} — title only
47 C.F.R. [1]
{{CodeFedReg/sandbox|47|volume=5}} — title+volume
47 C.F.R. [2]
{{CodeFedReg/sandbox|47|chapter=I}} — title+chapter
47 C.F.R. [3]
{{CodeFedReg/sandbox|47|chapter=I|subchapter=D}} — title+chapter+subchapter
47 C.F.R. [4]

Title XXX CFR Part YYY exists as a Wikipedia article

{{CodeFedReg/sandbox|47|15}} — title+part only
47 C.F.R. 15
{{CodeFedReg/sandbox|47|15|239}} — title+part+section (and no subpart)
47 C.F.R. 15.239
{{CodeFedReg/sandbox|47|15|subpart=C}} — title+part+subpart and no section
47 C.F.R. 15
{{CodeFedReg/sandbox|47|15|subpart=C|239}} — both subpart and section given, so section should override in link
47 C.F.R. 15.239

Title XXX CFR Part YYY doesn't exist as a Wikipedia article

{{CodeFedReg/sandbox|47|73}} — title+part only
47 C.F.R. 73
{{CodeFedReg/sandbox|47|73|1650}} — title+part+section (and no subpart)
47 C.F.R. 73.1650
{{CodeFedReg/sandbox|47|73|subpart=H}} — title+part+subpart and no section
47 C.F.R. 73
{{CodeFedReg/sandbox|47|73|subpart=H|1650}} — both subpart and section given, so section should override in link
47 C.F.R. 73.1650

Appendices and other special sections

{{CodeFedReg/sandbox|40|88|104-94}} — title+part+section containing a dash
40 C.F.R. 88.104-94
{{CodeFedReg/sandbox|14|121|appendix=.0000_0nbspnbspnbsp.k|appendix_desc=Appendix K}} — title+part+appendix
14 C.F.R. 121
{{CodeFedReg/sandbox|14|91|appendix=.2|appendix_desc=SFAR 60}} — title+part+special section
14 C.F.R. 91

Deprecated unusual prefixed section IDs

Displays as it did before but now links only to the part.

{{CodeFedReg/sandbox|14|91|prefix=SFAR|60}} — oddly prefixed section given
14 C.F.R. 91.60
{{CodeFedReg/sandbox|14|91|subpart=L|prefix=App|G}} — subpart and oddly prefixed section given
14 C.F.R. 91.G