Difference between revisions of "Template:Bar percent/testcases"

From blackwiki
Jump to navigation Jump to search
imported>Ahecht
m (→‎Test3: simplify)
imported>Ahecht
(→‎Test3: expand)
Line 71: Line 71:
  
 
== Test3 ==
 
== Test3 ==
<pre>{{Bar box|bars=
+
<pre>
 +
{{Bar box|bars=
 
{{bar percent||violet|40|barwidth=}}
 
{{bar percent||violet|40|barwidth=}}
 +
}}
 +
{{Bar box|bars=
 +
{{bar percent||violet|40}}
 
}}
 
}}
 
{{Bar box|bars=
 
{{Bar box|bars=
Line 85: Line 89:
  
 
===[[:Template:Bar percent]]===
 
===[[:Template:Bar percent]]===
 +
{{Bar box|bars=
 +
{{bar percent||violet|40}}
 +
}}
 
{{Bar box|bars=
 
{{Bar box|bars=
 
{{bar percent||violet|40|barwidth=}}
 
{{bar percent||violet|40|barwidth=}}
Line 99: Line 106:
  
 
===[[:Template:Bar percent/sandbox]]===
 
===[[:Template:Bar percent/sandbox]]===
 +
{{Bar box/sandbox|bars=
 +
{{bar percent/sandbox||violet|40}}
 +
}}
 
{{Bar box/sandbox|bars=
 
{{Bar box/sandbox|bars=
 
{{bar percent/sandbox||violet|40|barwidth=}}
 
{{bar percent/sandbox||violet|40|barwidth=}}

Revision as of 14:35, 15 April 2020

Test1

{{Bar box|bars=
{{bar percent|foo|red|30}}
{{bar percent|bar|green|40}}
{{bar percent|baz|blue|20}}
{{bar percent|bla|orange|8}}
{{bar percent|bla|teal|2|1/50}}
}}

Template:Bar percent

foo
30%
bar
40%
baz
20%
bla
8%
bla
1/50

Template:Bar percent/sandbox

foo
30%
bar
40%
baz
20%
bla
8%
bla
1/50

Test2

{{Bar box|bars=
{{bar percent|foo|red|30|bg=LightGray|barwidth=500px}}
{{bar percent||green|40|barwidth=500px}}
{{bar percent|bg=LightGray|barwidth=500px|baz|blue}}
{{bar percent|baz|blue|bg=LightGray|barwidth=500px}}
{{bar percent|baz|blue||bg=LightGray|barwidth=500px}}
{{bar percent|barwidth=500px|1=bla|3=8}}
{{bar percent|bla||8|barwidth=500px}}
{{bar percent|blah|teal|2|1/50|bg=LightGray|barwidth=500px}}
{{bar percent|bar|indigo|40|barwidth=500px|note=This is a note}}
{{bar percent|barbar|violet|40|bg=LightGray|barwidth=500px|note=So is this}}
}}

Template:Bar percent

foo
30%
40%
baz
0%
baz
0%
baz
%
bla
8%
bla
8%
blah
1/50
bar
40% This is a note
barbar
40% So is this

Template:Bar percent/sandbox

foo
30%
40%
baz
0%
baz
0%
baz
0%
bla
8%
bla
8%
blah
1/50
bar
40% This is a note
barbar
40% So is this

Test3

{{Bar box|bars=
{{bar percent||violet|40|barwidth=}}
}}
{{Bar box|bars=
{{bar percent||violet|40}}
}}
{{Bar box|bars=
{{bar percent||violet|40|barwidth=500}}
}}
{{Bar box|bars=
{{bar percent||violet|40|barwidth=500px}}
}}
{{Bar box|bars=
{{bar percent||violet|40|barwidth=Invalid}}
}}

Template:Bar percent

40%
40%
40%
40%
40%

Template:Bar percent/sandbox

40%
40%
40%
40%
40%