2 package require tcltest 2.2
3 namespace import -force tcltest::*
7 test progressbar-1.1 "Setup" -body {
11 test progressbar-1.2 "Linked variable" -body {
13 .pb configure -variable PB
17 test progressbar-1.3 "Change linked variable" -body {
22 test progressbar-1.4 "Set linked variable to bad value" -body {
27 test progressbar-1.4.1 "Set linked variable back to a good value" -body {
32 test progressbar-1.5 "Set -variable to illegal variable" -body {
34 .pb configure -variable BAD
38 test progressbar-1.6 "Unset -variable" -body {
39 unset -nocomplain UNSET
40 .pb configure -variable UNSET
44 test progressbar-2.0 "step command" -body {
45 .pb configure -variable {} ;# @@@
46 .pb configure -value 5 -maximum 10 -mode determinate
51 test progressbar-2.1 "step command, with stepamount" -body {
56 test progressbar-2.2 "step wraps at -maximum in determinate mode" -body {
61 test progressbar-2.3 "step doesn't wrap in indeterminate mode" -body {
62 .pb configure -value 8 -maximum 10 -mode indeterminate
69 test progressbar-2.4 "step with linked variable" -body {
70 .pb configure -variable PB ;# @@@
76 test progressbar-2.5 "error in write trace" -body {
77 trace variable PB w { error "YIPES!" ;# }
80 } -cleanup { unset PB } -returnCodes error -match glob -result "*YIPES!"
82 test progressbar-end "Cleanup" -body {