Template:Portal/testcases

From Wikipedia, the free encyclopedia
Jump to: navigation, search

No parameters[edit]

Main template

{{portal}}

No portals specified: please specify at least one portal
Sandbox

{{portal/sandbox}}

No portals specified: please specify at least one portal

One existing portal[edit]

Main template

{{portal|Politics}}

Sandbox

{{portal/sandbox|Politics}}

One non-existent portal[edit]

Main template

{{portal|Non-existent portal}}

Sandbox

{{portal/sandbox|Non-existent portal}}

One portal alias[edit]

Main template

{{portal|Detroit}}

Sandbox

{{portal/sandbox|Detroit}}

Portal alias, one of multiple aliases for the same portal[edit]

Main template

{{portal|Georgia USA}}

Sandbox

{{portal/sandbox|Georgia USA}}

Portal starting with number[edit]

Main template

{{portal|1990s}}

Sandbox

{{portal/sandbox|1990s}}

Portal starting with diacritic[edit]

Main template

{{portal|Éire}}

Sandbox

{{portal/sandbox|Éire}}

Six portals[edit]

Main template

{{portal|Art|Non-existent portal|Science|Japan|Music|Sport}}

Sandbox

{{portal/sandbox|Art|Non-existent portal|Science|Japan|Music|Sport}}

Twenty portals[edit]

Main template

{{portal|Asian Games|Association football|A-League|Association football variants|Athletics|Australian rules football|English football|Badminton|Baseball|Basketball|College basketball|National Basketball Association|Sport of Canada|Commonwealth Games|Cricket|Australian cricket team in England in 1948|Indian Premier League|Cycling|Fencing|Figure skating}}

Sandbox

{{portal/sandbox|Asian Games|Association football|A-League|Association football variants|Athletics|Australian rules football|English football|Badminton|Baseball|Basketball|College basketball|National Basketball Association|Sport of Canada|Commonwealth Games|Cricket|Australian cricket team in England in 1948|Indian Premier League|Cycling|Fencing|Figure skating}}

Non-breaking space[edit]

Main template

{{portal| }}

No portals specified: please specify at least one portal
Sandbox

{{portal/sandbox| }}

No portals specified: please specify at least one portal

Non-breaking space typed out[edit]

Main template

{{portal| }}

Portal icon [[Portal: |  portal]]
Sandbox

{{portal/sandbox| }}

Portal icon [[Portal: |  portal]]

ASCII null value[edit]

Main template

{{portal|�}}

Portal icon [[Portal:�|� portal]]
Sandbox

{{portal/sandbox|�}}

Portal icon [[Portal:�|� portal]]


Tab character[edit]

Main template

{{portal| }}

No portals specified: please specify at least one portal
Sandbox

{{portal/sandbox| }}

No portals specified: please specify at least one portal

Bar template[edit]

Main template

{{portal|{{!}}}}

Portal icon [[Portal:||| portal]]
Sandbox

{{portal/sandbox|{{!}}}}

Portal icon [[Portal:||| portal]]

Nowiki markup[edit]

Main template

{{portal|<nowiki/>}}

Portal icon [[Portal:| portal]]
Sandbox

{{portal/sandbox|<nowiki/>}}

Portal icon [[Portal:| portal]]

Spaces[edit]

Main template

{{portal| }}

No portals specified: please specify at least one portal
Sandbox

{{portal/sandbox| }}

No portals specified: please specify at least one portal

Line breaks only[edit]

Main template

{{portal| }}

No portals specified: please specify at least one portal
Sandbox

{{portal/sandbox| }}

No portals specified: please specify at least one portal

Six portals with mixed line breaks[edit]

Main template

{{portal |Art |Non-existent portal| Science |Japan |Music|Sport}}

Sandbox

{{portal/sandbox |Art |Non-existent portal| Science |Japan |Music|Sport}}

Non-ASCII characters[edit]

Main template

{{portal|文字}}

Sandbox

{{portal/sandbox|文字}}

ParserFunctions[edit]

Main template

{{portal| {{#if: 1 | Art }} }}

Sandbox

{{portal/sandbox| {{#if: 1 | Art }} }}

Long word[edit]

Main template

{{portal|Thisisareallylongwordwithnospacesorlinebreaksatall}}

Sandbox

{{portal/sandbox|Thisisareallylongwordwithnospacesorlinebreaksatall}}

Nil first parameter[edit]

Main template

{{portal|2=Politics}}

Sandbox

{{portal/sandbox|2=Politics}}

Various whitespace and nil parameters[edit]

Main template

{{portal|| |Politics| |Art|9=Music| |21=Sport}}

Sandbox

{{portal/sandbox|| |Politics| |Art|9=Music| |21=Sport}}

Left-aligned[edit]

Main template

{{portal|Politics|left=yes}}

Sandbox

{{portal/sandbox|Politics|left=yes}}

Custom margin[edit]

Main template

{{portal|Politics|margin=5em 5em 5em 5em}}

Sandbox

{{portal/sandbox|Politics|margin=5em 5em 5em 5em}}

Custom margin and left-aligned[edit]

Main template

{{portal|Politics|left=yes|margin=5em 5em 5em 5em}}

Sandbox

{{portal/sandbox|Politics|left=yes|margin=5em 5em 5em 5em}}

Break parameter[edit]

Main template

{{portal|Politics|break=yes}}

Sandbox

{{portal/sandbox|Politics|break=yes}}

Custom box size[edit]

Main template

{{portal|Politics|boxsize=300}}

Sandbox

{{portal/sandbox|Politics|boxsize=300}}

Small box size[edit]

Main template

{{portal|Politics|boxsize=50}}

Sandbox

{{portal/sandbox|Politics|boxsize=50}}

All parameters[edit]

Main template

{{portal|Politics|Art|Music|Literature|left=yes|margin=5em 5em 5em 5em|boxsize=300|break=yes}}

Sandbox

{{portal/sandbox|Politics|Art|Music|Literature|left=yes|margin=5em 5em 5em 5em|boxsize=300|break=yes}}