Difference between revisions of "Template:Font color/testcases"

From blackwiki
Jump to navigation Jump to search
imported>Cpiral
(inline test.)
imported>Cpiral
(+ purge)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
Tests show calls to main or sandbox, both:
+
Usage comparing sandbox and template tests: parameter naming and parameter value tests.
* with and without link
+
{| style=width:80%
* link explicit or implicit
+
|-
* with and without named parameters.
+
|style=text-align:right|{{purge|Purge this pages server cache.}}
 +
|}
 +
== Inline ==
  
Inline test of spacing should show simple {{font color/sandbox|red|red}} and {{font color|purple|purple}} playing nicely.
+
[[ Rainbow ]] test of spacing of:<br/>
 +
red,
 +
orange+yellow,
 +
green*blue and
 +
indigo#violet
 +
all playing nicely.
  
== One color tests ==
+
'''Spacing testing''': only the commas have there usual spacing, the other symbols don't.<br/>
 +
{{ font color | red | red }},
 +
{{ font color | orange | orange }}+{{ font color | tan | tan | link = yes }},
 +
{{ font color | green | green }}*{{ font color | blue | blue | link = cat }},
 +
{{ font color | indigo | indigo }}#{{ font color | violet | violet }},
 +
all playing nicely.
  
* {{#invoke:DemoTemplate|Font color|green|Aristotle}}
+
'''Sandbox spacing testing''': only the symbols have no space, the commas have their usual spacing.<br/>
* {{#invoke:DemoTemplate|Font color|green|Aristotle|link=yes}}
+
{{ font color/sandbox | red | red }},
* {{#invoke:DemoTemplate|Font color|green|Aristotle|link=Plato}}
+
{{ font color/sandbox | orange | orange }}+{{ font color/sandbox | tan | tan | link = yes }},
* {{#invoke:DemoTemplate|Font color|fg=green|text=Aristotle|link=Plato}}
+
{{ font color/sandbox | green | green }}*{{ font color/sandbox | blue | blue | link = cat }},
 +
{{ font color/sandbox | indigo | indigo }}#{{ font color/sandbox | violet | violet }},
 +
all playing nicely.
  
* {{#invoke:DemoTemplate|Font color/sandbox|green|Aristotle}}
+
== One color ==
* {{#invoke:DemoTemplate|Font color/sandbox|green|Aristotle|link=yes}}
 
* {{#invoke:DemoTemplate|Font color/sandbox|green|Aristotle|link=Plato}}
 
* {{#invoke:DemoTemplate|Font color/sandbox|fg=green|text=Aristotle|link=Plato}}
 
  
== Two color tests ==
+
:<code>{<nowiki/>{ Font color | green | Aristotle }}</code> &rarr; {{ Font color | green | Aristotle }}
 +
:<code>{<nowiki/>{ Font color | green | Aristotle | link = yes }}</code> &rarr; {{ Font color | green | Aristotle | link = yes }}
 +
:<code>{<nowiki/>{ Font color | green | text = Aristotle | link = Plato }}</code> &rarr; {{ Font color | green | text = Aristotle | link = Plato }}
 +
:<code>{<nowiki/>{ Font color | text = Aristotle | fg = green }}</code> &rarr; {{ Font color | text = Aristotle | fg = green }}
  
* {{#invoke:DemoTemplate|font color|white|blue|Aristotle}}
+
{<nowiki/>{ Font color/sandbox | green | Aristotle }} &rarr; {{ Font color/sandbox | green | Aristotle}}
* {{#invoke:DemoTemplate|font color|fg=white|bg=blue|text=Aristotle}}
+
{<nowiki/>{ Font color/sandbox | green | Aristotle | link = yes }} &rarr; {{ Font color/sandbox | green | Aristotle | link = yes }}
* {{#invoke:DemoTemplate|font color|white|blue|Aristotle|link=yes}}
+
{<nowiki/>{ Font color/sandbox | green | text = Aristotle | link = Plato }} &rarr; {{ Font color/sandbox | green | text = Aristotle | link = Plato }}
* {{#invoke:DemoTemplate|font color|fg=white|bg=blue|text=Aristotle|link=yes}}
+
{<nowiki/>{ Font color/sandbox | text = Aristotle | fg = green }} &rarr; {{ Font color/sandbox | text = Aristotle | fg = green }}
* {{#invoke:DemoTemplate|font color|white|blue|Aristotle|link=Plato}}
 
* {{#invoke:DemoTemplate|font color|fg=white|bg=blue|text=Aristotle|link=Plato}}
 
  
* {{#invoke:DemoTemplate|font color/sandbox|white|blue|Aristotle}}
+
== Two color ==
* {{#invoke:DemoTemplate|font color/sandbox|fg=white|bg=blue|text=Aristotle}}
 
* {{#invoke:DemoTemplate|font color/sandbox|white|blue|Aristotle|link=yes}}
 
* {{#invoke:DemoTemplate|font color/sandbox|fg=white|bg=blue|text=Aristotle|link=yes}}
 
* {{#invoke:DemoTemplate|font color/sandbox|white|blue|Aristotle|link=Plato}}
 
* {{#invoke:DemoTemplate|font color/sandbox|fg=white|bg=blue|text=Aristotle|link=Plato}}
 
  
* {{#invoke:DemoTemplate|font color|purple|Teen Big Brother|link=Teen Big Brother: The Experiment}}
+
:<code> {<nowiki/>{ font color | white | blue | Aristotle }}</code> &rarr;  {{ font color | white | blue | Aristotle}}
* {{#invoke:DemoTemplate|font color|fg=purple|text=Teen Big Brother|link=Teen Big Brother: The Experiment}}
+
:<code> {<nowiki/>{ font color | white | bg = blue | text = Aristotle }}</code> &rarr;  {{ font color | white | bg = blue | text = Aristotle }}
* {{#invoke:DemoTemplate|font color/sandbox|purple|Teen Big Brother|link=Teen Big Brother: The Experiment}}
+
:<code> {<nowiki/>{ font color | white | blue | Aristotle | link = yes }}</code> &rarr;  {{ font color | white | blue | Aristotle | link = yes }}
* [[Teen Big Brother: The Experiment|{{font color|red|Teen Big Brother}}]]
+
:<code> {<nowiki/>{ font color | white | blue | text = Aristotle | link = yes }}</code> &rarr;  {{ font color | white | blue | text = Aristotle | link = yes }}
 +
:<code> {<nowiki/>{ font color | white | blue | Aristotle | link = Plato }}</code> &rarr;  {{ font color | white | blue | Aristotle | link = Plato }}
 +
:<code> {<nowiki/>{ font color | link = Plato | bg = blue | fg = white | text = Aristotle }}</code> &rarr;  {{ font color | link = Plato | bg = blue | fg = white | text = Aristotle }}
  
---- Bugs ----
+
{<nowiki/>{ font color/sandbox | white | blue | Aristotle }} &rarr; {{ font color/sandbox | white | blue | Aristotle }}
 +
{<nowiki/>{ font color/sandbox | white | bg = blue | text = Aristotle }} &rarr; {{ font color/sandbox | white | bg = blue | text = Aristotle }}
 +
{<nowiki/>{ font color/sandbox | white | blue | Aristotle | link = yes }} &rarr; {{ font color/sandbox | white | blue | Aristotle | link = yes }}
 +
{<nowiki/>{ font color/sandbox | white | blue | text = Aristotle | link = yes }} &rarr; {{ font color/sandbox | white | blue | text = Aristotle | link = yes }}
 +
{<nowiki/>{ font color/sandbox | white | blue | Aristotle | link = Plato }} &rarr; {{ font color/sandbox | white | blue | Aristotle | link = Plato }}
 +
{<nowiki/>{ font color/sandbox | link = Plato | bg = blue | fg = white | text=Aristotle }} &rarr; {{ font color/sandbox | link = Plato | bg = blue | fg = white | text = Aristotle }}
  
# {{font color/sandbox|red|This breaks on apostrophe'123}}
+
== Bugs ==
Wrap <nowiki>{{{3}}}</nowiki> in invoke:String|replace to fix (1).
 
See for example {{tic|linksto}}.
 
p
 
{{code|
 
{{font color/sandbox|red|This breaks on apostophe'123}}
 
}}
 
  
* {{font color/sandbox|red|This breaks on<br />break}}
+
:{{ font color | red | Reported }} {{ tlf | cross }}.
{{code|{{font color/sandbox|red|This breaks on<br />break}}
+
:{{ font color | orange | Fixed }} {{ tlf | check }}.
 +
 
 +
== See also ==
 +
* {{ tl | code }} to troubleshoot HTML output, e.g. {{ code | {{font color/sandbox | red | thisText }}
 
}}
 
}}

Latest revision as of 12:57, 13 December 2015

Usage comparing sandbox and template tests: parameter naming and parameter value tests.

Script error: No such module "Purge".

Inline

Rainbow test of spacing of:
red, orange+yellow, green*blue and indigo#violet all playing nicely.

Spacing testing: only the commas have there usual spacing, the other symbols don't.
red, orange+tan, green*blue, indigo#violet, all playing nicely.

Sandbox spacing testing: only the symbols have no space, the commas have their usual spacing.
red, orange+tan, green*blue, indigo#violet, all playing nicely.

One color

{{ Font color | green | Aristotle }}Aristotle
{{ Font color | green | Aristotle | link = yes }}Aristotle
{{ Font color | green | text = Aristotle | link = Plato }}Aristotle
{{ Font color | text = Aristotle | fg = green }}Aristotle
{{ Font color/sandbox | green | Aristotle }} → Aristotle
{{ Font color/sandbox | green | Aristotle | link = yes }} → Aristotle
{{ Font color/sandbox | green | text = Aristotle | link = Plato }} → Aristotle
{{ Font color/sandbox | text = Aristotle | fg = green }} → Aristotle

Two color

{{ font color | white | blue | Aristotle }}Aristotle
{{ font color | white | bg = blue | text = Aristotle }}Aristotle
{{ font color | white | blue | Aristotle | link = yes }}Aristotle
{{ font color | white | blue | text = Aristotle | link = yes }}Aristotle
{{ font color | white | blue | Aristotle | link = Plato }}Aristotle
{{ font color | link = Plato | bg = blue | fg = white | text = Aristotle }}Aristotle
{{ font color/sandbox | white | blue | Aristotle }} → Aristotle
{{ font color/sandbox | white | bg = blue | text = Aristotle }} → Aristotle
{{ font color/sandbox | white | blue | Aristotle | link = yes }} → Aristotle
{{ font color/sandbox | white | blue | text = Aristotle | link = yes }} → Aristotle
{{ font color/sandbox | white | blue | Aristotle | link = Plato }} → Aristotle
{{ font color/sandbox | link = Plato | bg = blue | fg = white | text=Aristotle }} → Aristotle

Bugs

Reported {{cross}}.
Fixed {{check}}.

See also

  • {{ code }} to troubleshoot HTML output, e.g. <span style="color:red;">thisText</span>