Jump to content

Template:ISO 3166 code-3/testcases: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m Undid revision 1080850655 by Wqnvlz (talk) Reset
m Executed subst: test
Tag: Reverted
Line 20: Line 20:
! notes || Input || Current || Sandbox || subst: || Sandbox subst:
! notes || Input || Current || Sandbox || subst: || Sandbox subst:
|-
|-
| {{Expand wikitext|{{Make code|{=(|}=)|{{Replace|1=<td>((Separated entries!separator=&vert;!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}/sandbox!$))</td>|2=$|3=Guinea}}}}}}
| {{Expand wikitext|{{Make code|{=(|}=)|{{Replace|1=<td>((Separated entries!separator=&vert;!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}/sandbox!$))</td><td>
{{#invoke:ISO 3166|code|Guinea|codetype=alpha3}}
</td><td>
GIN
</td>|2=$|3=Guinea}}}}}}
|-
|-
| hyphenated country name {{Expand wikitext|{{Make code|{=(|}=)|{{Replace|1=<td>((Separated entries!separator=&vert;!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}/sandbox!$))</td>|2=$|3=Guinea-Bissau}}}}}}
| hyphenated country name {{Expand wikitext|{{Make code|{=(|}=)|{{Replace|1=<td>((Separated entries!separator=&vert;!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}/sandbox!$))</td><td>
{{#invoke:ISO 3166|code|Guinea-Bissau|codetype=alpha3}}
</td><td>
GNB
</td>|2=$|3=Guinea-Bissau}}}}}}
|-
|-
| off-by-hyphen name {{Expand wikitext|{{Make code|{=(|}=)|{{Replace|1=<td>((Separated entries!separator=&vert;!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}/sandbox!$))</td>|2=$|3=GuineaBissau}}}}}}
| off-by-hyphen name {{Expand wikitext|{{Make code|{=(|}=)|{{Replace|1=<td>((Separated entries!separator=&vert;!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}/sandbox!$))</td><td>
{{#invoke:ISO 3166|code|GuineaBissau|codetype=alpha3}}
</td><td>

</td>|2=$|3=GuineaBissau}}}}}}
|-
|-
| invalid name {{Expand wikitext|{{Make code|{=(|}=)|{{Replace|1=<td>((Separated entries!separator=&vert;!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}/sandbox!$))</td>|2=$|3=Foobarbaz}}}}}}
| invalid name {{Expand wikitext|{{Make code|{=(|}=)|{{Replace|1=<td>((Separated entries!separator=&vert;!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}/sandbox!$))</td><td>
{{#invoke:ISO 3166|code|Foobarbaz|codetype=alpha3}}
</td><td>

</td>|2=$|3=Foobarbaz}}}}}}
|-
|-
| subdivision in second argument {{Expand wikitext|{{Make code|{=(|}=)|{{Replace|1=<td>((Separated entries!separator=&vert;!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}/sandbox!$))</td>|2=$|3=United Kingdom!England}}}}}}
| subdivision in second argument {{Expand wikitext|{{Make code|{=(|}=)|{{Replace|1=<td>((Separated entries!separator=&vert;!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}/sandbox!$))</td><td>
{{#invoke:ISO 3166|code|United Kingdom|codetype=alpha3}}
</td><td>
GB-ENG
</td>|2=$|3=United Kingdom!England}}}}}}
|-
|-
| subdivision after hyphen {{Expand wikitext|{{Make code|{=(|}=)|{{Replace|1=<td>((Separated entries!separator=&vert;!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}/sandbox!$))</td>|2=$|3=United Kingdom-England}}}}}}
| subdivision after hyphen {{Expand wikitext|{{Make code|{=(|}=)|{{Replace|1=<td>((Separated entries!separator=&vert;!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}/sandbox!$))</td><td>
{{#invoke:ISO 3166|code|United Kingdom-England|codetype=alpha3}}
</td><td>
GB-ENG
</td>|2=$|3=United Kingdom-England}}}}}}
|-
|-
| Wikilinks {{Expand wikitext|{{Make code|{=(|}=)|{{Replace|1=<td>((Separated entries!separator=&vert;!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}/sandbox!$))</td>|2=$|3=[[Russia]]![[Sakha Republic]]}}}}}}
| Wikilinks {{Expand wikitext|{{Make code|{=(|}=)|{{Replace|1=<td>((Separated entries!separator=&vert;!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}/sandbox!$))</td><td>
{{#invoke:ISO 3166|code|[[Russia]]|codetype=alpha3}}
</td><td>
RU-SA
</td>|2=$|3=[[Russia]]![[Sakha Republic]]}}}}}}
|-
|-
| no input {{Expand wikitext|{{Make code|{=(|}=)|{{Replace|1=<td>((Separated entries!separator=&vert;!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}/sandbox!$))</td>|2=$|3=<!--nothing-->}}}}}}
| no input {{Expand wikitext|{{Make code|{=(|}=)|{{Replace|1=<td>((Separated entries!separator=&vert;!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}!$))</td><td>(({{NAMESPACE}}:{{ROOTPAGENAME}}/sandbox!$))</td><td>
{{#invoke:ISO 3166|code||codetype=alpha3}}
</td><td>
<span class="error">ISO 3166: name not specified</span>
</td>|2=$|3=<!--nothing-->}}}}}}
|}
|}
<!--
<!--

Revision as of 10:45, 4 April 2022

  • {{ISO 3166 code-3|Switzerland}} → CHE
notes Input Current Sandbox subst: Sandbox subst:
GuineaGINGIN

GIN

GIN

hyphenated country name Guinea-BissauGNB

GNB

off-by-hyphen name GuineaBissauGNBGNB

GNB

invalid name Foobarbaz
subdivision in second argument United Kingdom|EnglandGB-ENGGB-ENG

GBR

GB-ENG

subdivision after hyphen United Kingdom-EnglandGB-ENGGB-ENG

GB-ENG

GB-ENG

Wikilinks Russia|Sakha RepublicRU-SARU-SA

RUS

RU-SA

no input

ISO 3166: name not specified