Jump to content

Template:Progress bar/testcases

From Wikisource

Basic invocation

[edit]
{{Progress bar}}
{{Progress bar|
 | total = 300
 | validated = 150
 | proofread = 100
 | not proofread = 20
 | notext = 10
 | problematic = 5
}}

{{Progress bar}}

{{Progress bar/sandbox}}

Width and height

[edit]
{{Progress bar}}
{{Progress bar|
 | total = 300
 | validated = 150
 | proofread = 100
 | not proofread = 20
 | notext = 10
 | problematic = 5
 | existing_only = yes
 | height = 30px
 | width = 50%
}}

{{Progress bar}}

{{Progress bar/sandbox}}

Argument handling

[edit]

With no arguments

[edit]
{{Progress bar}}
{{Progress bar}}

{{Progress bar}}

Expression error: total is 0.

{{Progress bar/sandbox}}

Expression error: total is 0.

With garbage input

[edit]
{{Progress bar}}
{{Progress bar|
 | total = ABBA
 | validated = no
 | proofread = yes
 | not proofread = 20000
 | notext = {{greek|Aloha!}}
 | problematic = No you!
}}

{{Progress bar}}

Expression error: total = ABBA is not a number.

{{Progress bar/sandbox}}

Expression error: total = ABBA is not a number.

With valid arguments outside range

[edit]
{{Progress bar}}
{{Progress bar|
 | total = 50
 | validated = 10
 | proofread = 20
 | not proofread = 30
 | notext = 66
 | problematic = 10000
}}

{{Progress bar}}

Expression error: notext = 66 > total = 50.

{{Progress bar/sandbox}}

Expression error: notext = 66 > total = 50.

{{Progress bar}}
{{Progress bar|
 | total = 60
 | validated = 10
 | proofread = 20
 | not proofread = 30
 | notext = 40
 | problematic = 50
}}

{{Progress bar}}

Expression error: page sum = 150 > total = 60.

{{Progress bar/sandbox}}

Expression error: page sum = 150 > total = 60.

With illogical but valid arguments

[edit]
{{Progress bar}}
{{Progress bar|
 | total = 50
 | validated = -10
 | proofread = -20
 | not proofread = -30
 | notext = -66
 | problematic = -10000
}}

{{Progress bar}}

Expression error: validated = -10 < 0.

{{Progress bar/sandbox}}

Expression error: validated = -10 < 0.