Template:Legend/testcases

{{Template test cases notice}}

{{test case nowiki|collapsible=yes|showcode=yes|title=In a caption|

[[File:Celts in Europe.png|200px|thumb|right|The Celts in Europe, past and present:

{{__TEMPLATENAME__|#1a8000|present-day Celtic-speaking areas}}

{{__TEMPLATENAME__|#27c600|other parts of the six most commonly recognized 'Celtic nations' and where a Celtic language is spoken but not the dominating language}}

{{__TEMPLATENAME__|#97ffb6|other parts of Europe once peopled by Celts; modern-day inhabitants of many of these areas often claim a Celtic heritage and/or culture}}]]

}}

{{test case nowiki|collapsible=yes|showcode=yes|title=Pre-text addition|

{{__TEMPLATENAME__|black|Africa}}

{{__TEMPLATENAME__|green|Americas}}

{{__TEMPLATENAME__|blue|Oceania}}

{{__TEMPLATENAME__|#ffa|Europe|outline=silver}}

{{__TEMPLATENAME__|#ff2800|Asia}}

}}

{{test case nowiki|collapsible=yes|showcode=yes|title=Post-text addition|

{{__TEMPLATENAME__|black|Africa|text=Af}}

{{__TEMPLATENAME__|black|Africa|text=Af|textcolor=red}}

{{__TEMPLATENAME__|black|Africa|textcolor=white}}

{{__TEMPLATENAME__|green|Americas|text=Am}}

{{__TEMPLATENAME__|blue|Oceania|text=Oc}}

{{__TEMPLATENAME__|#ffa|Europe|outline=silver|text=Eu}}

{{__TEMPLATENAME__|#ff2800|Asia|border=1px dashed yellow|text=As}}

}}

{{test case nowiki|collapsible=yes|showcode=yes|title=Without second parameter|

{{__TEMPLATENAME__|black}}

{{__TEMPLATENAME__|green}}

{{__TEMPLATENAME__|blue}}

{{__TEMPLATENAME__|#ffa|outline=silver}}

{{__TEMPLATENAME__|#ff2800}}

}}

{{test case nowiki|collapsible=yes|showcode=yes|title=With alt text|

{{__TEMPLATENAME__|black|Africa|alt=Af}}

{{__TEMPLATENAME__|green|Americas|alt=Am}}

{{__TEMPLATENAME__|blue|Oceania|alt=Oc}}

{{__TEMPLATENAME__|#ffa|Europe|outline=silver|alt=Eu}}

{{__TEMPLATENAME__|#ff2800|Asia|border=1px dashed yellow|alt=As}}

}}

{{test case nowiki|collapsible=yes|showcode=yes|title=With alt text and regular text (some missing, some blank)|

{{__TEMPLATENAME__|black|Africa|text=Africa}}

{{__TEMPLATENAME__|green|Americas|text=Americas}}

{{__TEMPLATENAME__|blue|Oceania|alt=|text=Oceania}}

{{__TEMPLATENAME__|#ffa|Europe|outline=silver|alt=Eu|text=Europe}}

{{__TEMPLATENAME__|#ff2800|Asia|border=1px dashed yellow|alt=As|text=}}

}}

{{test case nowiki|collapsible=yes|showcode=yes|title=With alt text, no color or bad color specified (error)|

{{__TEMPLATENAME__||Africa|alt=Af}}

{{__TEMPLATENAME__||Americas|alt=Am}}

{{__TEMPLATENAME__||Oceania|alt=Oc}}

{{__TEMPLATENAME__|Bar|Europe|outline=silver|alt=Eu}}

{{__TEMPLATENAME__|Foo|Asia|border=1px dashed yellow|alt=As}}

}}

{{test case nowiki|collapsible=yes|showcode=yes|title=Misnested span tag errors (found at Associate Justice of the Supreme Court of the Philippines)|

{{__TEMPLATENAME__|#f0f8ff|Elected as President|text=*}}

{{__TEMPLATENAME__|#fcc|Appointed as Chief Justice|text=*}}

{{__TEMPLATENAME__|#f0f8ff|Elected as President|text={{asterisk}}}}

{{__TEMPLATENAME__|#fcc|Appointed as Chief Justice|text={{asterisk}}}}

{{__TEMPLATENAME__|#f0f8ff|Elected as President|text={{*}}}}

{{__TEMPLATENAME__|#fcc|Appointed as Chief Justice|text={{*}}}}

{{__TEMPLATENAME__|#cfecd2|Green shading{{snd}}UNESCO designated World Heritage Sites (WHS)|border=solid 1px #AAAAAA|text=*}}

{{__TEMPLATENAME__|#cfecd2|Green shading{{snd}}UNESCO designated World Heritage Sites (WHS)|border=solid 1px #AAAAAA|text=#}}

}}