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

From blackwiki
Jump to navigation Jump to search
imported>Gadget850
(ce)
imported>Cpiral
(add DemoTemplate and side-by-side; document explanation; section into one and two-color tests)
Line 1: Line 1:
* {{Font color|green|Aristotle}}
+
Tests show calls to main or sandbox, both:
{{code|
+
* with and without link
{{Font color|green|Aristotle}}
+
* link explicit or implicit
}}
+
* with and without named parameters.
* {{Font color/sandbox|green|Aristotle}}
+
 
{{code|
+
== One color tests ==
{{Font color/sandbox|green|Aristotle}}
+
 
}}
+
* {{#invoke:DemoTemplate|Font color|green|Aristotle}}
* {{Font color/sandbox|green|Aristotle|link=yes}}
+
* {{#invoke:DemoTemplate|Font color|green|Aristotle|link=yes}}
* {{Font color/sandbox|green|Aristotle|link=Plato}}
+
* {{#invoke:DemoTemplate|Font color|green|Aristotle|link=Plato}}
* {{Font color/sandbox|red|Aristotle|link=Plato}}
+
* {{#invoke:DemoTemplate|Font color|fg=green|text=Aristotle|link=Plato}}
* {{Font color/sandbox|white|blue|Aristotle|link=yes}}
+
 
* {{Font color/sandbox|white|blue|Aristotle|link=Plato}}
+
* {{#invoke:DemoTemplate|Font color/sandbox|green|Aristotle}}
* {{font color/sandbox|purple|Teen Big Brother|link=Teen Big Brother: The Experiment}}
+
* {{#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 ==
 +
 
 +
* {{#invoke:DemoTemplate|font color|white|blue|Aristotle}}
 +
* {{#invoke:DemoTemplate|font color|fg=white|bg=blue|text=Aristotle}}
 +
* {{#invoke:DemoTemplate|font color|white|blue|Aristotle|link=yes}}
 +
* {{#invoke:DemoTemplate|font color|fg=white|bg=blue|text=Aristotle|link=yes}}
 +
* {{#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|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}}
 +
* {{#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}}]]
 
* [[Teen Big Brother: The Experiment|{{font color|red|Teen Big Brother}}]]
  
 +
---- Bugs ----
  
* {{font color/sandbox|red|This breaks on apostrophe'123}}
+
# {{font color/sandbox|red|This breaks on apostrophe'123}}
 +
Wrap <nowiki>{{{3}}}</nowiki> in invoke:String|replace to fix (1).
 +
See for example {{tic|linksto}}.
 +
p
 
{{code|
 
{{code|
 
{{font color/sandbox|red|This breaks on apostophe'123}}
 
{{font color/sandbox|red|This breaks on apostophe'123}}

Revision as of 08:20, 25 November 2015

Tests show calls to main or sandbox, both:

  • with and without link
  • link explicit or implicit
  • with and without named parameters.

One color tests

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

Two color tests

  • {{font color|white|blue|Aristotle}}Aristotle
  • {{font color|text=Aristotle|fg=white|bg=blue}}Aristotle
  • {{font color|white|blue|Aristotle|link=yes}}Aristotle
  • {{font color|bg=blue|text=Aristotle|fg=white|link=yes}}Aristotle
  • {{font color|white|blue|Aristotle|link=Plato}}Aristotle
  • {{font color|bg=blue|text=Aristotle|fg=white|link=Plato}}Aristotle
  • {{font color/sandbox|white|blue|Aristotle}}Aristotle
  • {{font color/sandbox|text=Aristotle|fg=white|bg=blue}}Aristotle
  • {{font color/sandbox|white|blue|Aristotle|link=yes}}Aristotle
  • {{font color/sandbox|bg=blue|text=Aristotle|fg=white|link=yes}}Aristotle
  • {{font color/sandbox|white|blue|Aristotle|link=Plato}}Aristotle
  • {{font color/sandbox|bg=blue|text=Aristotle|fg=white|link=Plato}}Aristotle
  • {{font color|purple|Teen Big Brother|link=Teen Big Brother: The Experiment}}Teen Big Brother
  • {{font color|text=Teen Big Brother|fg=purple|link=Teen Big Brother: The Experiment}}Teen Big Brother
  • {{font color/sandbox|purple|Teen Big Brother|link=Teen Big Brother: The Experiment}}Teen Big Brother
  • Teen Big Brother

Bugs ----

  1. This breaks on apostrophe'123

Wrap {{{3}}} in invoke:String|replace to fix (1). See for example Template:linksto (talk links edit). p <span style="color:red;">This breaks on apostophe'123</span>

  • This breaks on
    break

<span style="color:red;">This breaks on<br />break</span>