Template:Bar box/testcases
This is the template test cases page for the sandbox of Template:Bar box. to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki; see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins with these links: |
Test 1
{{Bar box|bars=<tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">foo</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:red; width:30%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">30%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bar</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:green; width:40%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">40%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">baz</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:blue; width:20%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">20%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:orange; width:8%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">8%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:teal; width:2%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">1/50</td> </tr>|float=right|title=Quantity of stuff|titlebar=#DDD}}
{{Bar box}}
{{Bar box/sandbox}}
Error: expandTemplate: template "Bar box/sandbox" does not exist
Test 2
{{Bar box|bars=<tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">foo</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:red; width:30%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">30%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bar</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:green; width:40%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">40%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">baz</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:blue; width:20%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">20%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:orange; width:8%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">8%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:teal; width:2%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">1/50</td> </tr>|float=left|title=Quantity of stuff|titlebar=#DDD}}
{{Bar box}}
{{Bar box/sandbox}}
Error: expandTemplate: template "Bar box/sandbox" does not exist
Test 3
{{Bar box|bars=<tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">foo</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:red; width:30%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">30%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bar</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:green; width:40%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">40%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">baz</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:blue; width:20%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">20%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:orange; width:8%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">8%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:teal; width:2%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">1/50</td> </tr>|float=none|title=Quantity of stuff|titlebar=#DDD}}
{{Bar box}}
{{Bar box/sandbox}}
Error: expandTemplate: template "Bar box/sandbox" does not exist
Test 4
{{Bar box|bars=<tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">foo</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:red; width:30%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">30%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bar</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:green; width:40%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">40%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">baz</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:blue; width:20%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">20%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:orange; width:8%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">8%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:teal; width:2%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">1/50</td> </tr>|float=center|title=Quantity of stuff|titlebar=#DDD}}
{{Bar box}}
{{Bar box/sandbox}}
Error: expandTemplate: template "Bar box/sandbox" does not exist
Test 5
{{Bar box|bars=<tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">foo</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:red; width:30%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">30%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bar</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:green; width:40%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">40%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">baz</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:blue; width:20%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">20%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:orange; width:8%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">8%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:teal; width:2%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">1/50</td> </tr>|float=right|title=Quantity of stuff|titlebar=#DDD|width=200px}}
{{Bar box}}
{{Bar box/sandbox}}
Error: expandTemplate: template "Bar box/sandbox" does not exist
Test 6
{{Bar box|bars=<tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">foo</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:red; width:30%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">30%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bar</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:green; width:40%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">40%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">baz</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:blue; width:20%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">20%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:orange; width:8%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">8%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:teal; width:2%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">1/50</td> </tr>|float=left|title=Quantity of stuff|titlebar=#DDD|width=200px}}
{{Bar box}}
{{Bar box/sandbox}}
Error: expandTemplate: template "Bar box/sandbox" does not exist
Test 7
{{Bar box|bars=<tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">foo</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:red; width:30%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">30%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bar</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:green; width:40%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">40%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">baz</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:blue; width:20%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">20%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:orange; width:8%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">8%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:teal; width:2%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">1/50</td> </tr>|float=none|title=Quantity of stuff|titlebar=#DDD|width=200px}}
{{Bar box}}
{{Bar box/sandbox}}
Error: expandTemplate: template "Bar box/sandbox" does not exist
Test 8
{{Bar box|bars=<tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">foo</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:red; width:30%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">30%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bar</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:green; width:40%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">40%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">baz</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:blue; width:20%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">20%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:orange; width:8%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">8%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:teal; width:2%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">1/50</td> </tr>|float=center|title=Quantity of stuff|titlebar=#DDD|width=200px}}
{{Bar box}}
{{Bar box/sandbox}}
Error: expandTemplate: template "Bar box/sandbox" does not exist
Test 9
{{Bar box|bars=<tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">foo</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:red; width:30%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">30%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bar</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:green; width:40%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">40%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">baz</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:blue; width:20%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">20%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:orange; width:8%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">8%</td> </tr> <tr> <td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td> <td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:teal; width:2%; overflow: hidden;"> </div></td> <td colspan="2" style="padding-left: 1.2em; padding-right: 0.4em; text-align: right;">1/50</td> </tr>|title=Quantity of stuff|titlebar=#DDD|width=200px}}
{{Bar box}}
{{Bar box/sandbox}}
Error: expandTemplate: template "Bar box/sandbox" does not exist