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

From blackwiki
Jump to navigation Jump to search
imported>Cpiral
(inline test.)
imported>Cpiral
(Cleanup: use markup to visually differentiate sandbox side; complete test suite removing excess; + sections Bugs ,See also)
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
 
* link explicit or implicit
 
* with and without named parameters.
 
  
Inline test of spacing should show simple {{font color/sandbox|red|red}} and {{font color|purple|purple}} playing nicely.
+
== Inline ==
  
== One color tests ==
+
[[Rainbow]] test of spacing of red,
 +
orange+yellow,
 +
green*blue and
 +
indigo#violet
 +
all playing nicely.
  
* {{#invoke:DemoTemplate|Font color|green|Aristotle}}
+
Together test of spacing of
* {{#invoke:DemoTemplate|Font color|green|Aristotle|link=yes}}
+
{{font color|red|red}},
* {{#invoke:DemoTemplate|Font color|green|Aristotle|link=Plato}}
+
{{font color|orange|orange}}+{{font color|yellow|yellow|link=yes}},
* {{#invoke:DemoTemplate|Font color|fg=green|text=Aristotle|link=Plato}}
+
{{font color|green|green}}*{{font color|blue|blue|link=cat}} and
 +
{{font color|indigo|indigo}}#{{font color|violet|violet}},
 +
all playing nicely.
  
* {{#invoke:DemoTemplate|Font color/sandbox|green|Aristotle}}
+
Sandbox test of spacing of
* {{#invoke:DemoTemplate|Font color/sandbox|green|Aristotle|link=yes}}
+
{{font color/sandbox|red|red}},
* {{#invoke:DemoTemplate|Font color/sandbox|green|Aristotle|link=Plato}}
+
{{font color/sandbox|orange|orange}}+{{font color|yellow|yellow|link=yes}},
* {{#invoke:DemoTemplate|Font color/sandbox|fg=green|text=Aristotle|link=Plato}}
+
{{font color/sandbox|green|green}}*{{font color|blue|blue|link=cat}} and
 +
{{font color/sandbox|indigo|indigo}}#{{font color|violet|violet}}
 +
all playing nicely.
  
== Two color tests ==
+
== One color ==
  
* {{#invoke:DemoTemplate|font color|white|blue|Aristotle}}
+
:{{#invoke:DemoTemplate|Font color|green|Aristotle}}
* {{#invoke:DemoTemplate|font color|fg=white|bg=blue|text=Aristotle}}
+
:{{#invoke:DemoTemplate|Font color|green|Aristotle|link=yes}}
* {{#invoke:DemoTemplate|font color|white|blue|Aristotle|link=yes}}
+
:{{#invoke:DemoTemplate|Font color|green|text=Aristotle|link=Plato}}
* {{#invoke:DemoTemplate|font color|fg=white|bg=blue|text=Aristotle|link=yes}}
+
:{{#invoke:DemoTemplate|Font color|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}}
+
{{#invoke:DemoTemplate|Font color/sandbox|green|Aristotle}}
* {{#invoke:DemoTemplate|font color/sandbox|fg=white|bg=blue|text=Aristotle}}
+
{{#invoke:DemoTemplate|Font color/sandbox|green|Aristotle|link=yes}}
* {{#invoke:DemoTemplate|font color/sandbox|white|blue|Aristotle|link=yes}}
+
{{#invoke:DemoTemplate|Font color/sandbox|green|text=Aristotle|link=Plato}}
* {{#invoke:DemoTemplate|font color/sandbox|fg=white|bg=blue|text=Aristotle|link=yes}}
+
{{#invoke:DemoTemplate|Font color/sandbox|text=Aristotle|fg=green}}
* {{#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}}
+
== Two color ==
* {{#invoke:DemoTemplate|font color|fg=purple|text=Teen Big Brother|link=Teen Big Brother: The Experiment}}
 
* {{#invoke:DemoTemplate|font color/sandbox|purple|Teen Big Brother|link=Teen Big Brother: The Experiment}}
 
* [[Teen Big Brother: The Experiment|{{font color|red|Teen Big Brother}}]]
 
  
---- Bugs ----
+
: {{#invoke:DemoTemplate|font color|white|blue|Aristotle}}
 +
: {{#invoke:DemoTemplate|font color|white|bg=blue|text=Aristotle}}
 +
: {{#invoke:DemoTemplate|font color|white|blue|Aristotle|link=yes}}
 +
: {{#invoke:DemoTemplate|font color|white|blue|text=Aristotle|link=yes}}
 +
: {{#invoke:DemoTemplate|font color|white|blue|Aristotle|link=Plato}}
 +
: {{#invoke:DemoTemplate|font color|link=Plato|bg=blue|fg=white|text=Aristotle}}
  
# {{font color/sandbox|red|This breaks on apostrophe'123}}
+
{{#invoke:DemoTemplate|font color/sandbox|white|blue|Aristotle}}
Wrap <nowiki>{{{3}}}</nowiki> in invoke:String|replace to fix (1).
+
{{#invoke:DemoTemplate|font color/sandbox|white|bg=blue|text=Aristotle}}
See for example {{tic|linksto}}.
+
{{#invoke:DemoTemplate|font color/sandbox|white|blue|Aristotle|link=yes}}
p
+
{{#invoke:DemoTemplate|font color/sandbox|white|blue|text=Aristotle|link=yes}}
{{code|
+
{{#invoke:DemoTemplate|font color/sandbox|white|blue|Aristotle|link=Plato}}
{{font color/sandbox|red|This breaks on apostophe'123}}
+
{{#invoke:DemoTemplate|font color/sandbox|link=Plato|bg=blue|fg=white|text=Aristotle}}
}}
 
  
* {{font color/sandbox|red|This breaks on<br />break}}
+
== Bugs ==
{{code|{{font color/sandbox|red|This breaks on<br />break}}
+
 
 +
:{{font color|red|Reported}} {{tlf|cross}}.
 +
:{{font color|orange|Fixed}} {{tlf|check}}.
 +
 
 +
 
 +
# {{#invoke:DemoTemplate|font color/sandbox|orange|<br />This breaks on apostrophe'123|link=cat}} {{done}}
 +
# {{#invoke:DemoTemplate|font color/sandbox|orange|<br />This breaks on<br />break}} {{done}}
 +
 
 +
== See also ==
 +
* {{tl|code}} to troubleshoot HTML output, e.g. {{code|{{font color/sandbox|red|thisText}}
 
}}
 
}}

Revision as of 19:47, 25 November 2015

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

Inline

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

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

Sandbox test of spacing of red, orange+yellow, green*blue and 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|fg=green|text=Aristotle}}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|fg=green|text=Aristotle}}Aristotle

Two color

{{font color|white|blue|Aristotle}}Aristotle
{{font color|white|text=Aristotle|bg=blue}}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|fg=white|text=Aristotle|bg=blue|link=Plato}}Aristotle
{{font color/sandbox|white|blue|Aristotle}}Aristotle
{{font color/sandbox|white|text=Aristotle|bg=blue}}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|fg=white|text=Aristotle|bg=blue|link=Plato}}Aristotle

Bugs

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


  1. {{font color/sandbox|orange|<br />This breaks on apostrophe'123|link=cat}}
    This breaks on apostrophe'123
     Done
  2. {{font color/sandbox|orange|<br />This breaks on<br />break}}
    This breaks on
    break
     Done

See also

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