diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-10-25 21:06:25 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-10-25 21:06:25 (GMT) |
| commit | 0d5336db012f45753abace489f18f0ca299c6961 (patch) | |
| tree | b1bf3280a9046df99226158978502eeb26f5b0a3 /tests/scale.test | |
| parent | e97381a6d921de403516d5b761539a450f4af83c (diff) | |
| parent | 1320b8a2a9c1269a345d44d673a7a35707fbbe9c (diff) | |
| download | tk-core-tip-626.zip tk-core-tip-626.tar.gz tk-core-tip-626.tar.bz2 | |
Merge 9.0core-tip-626
Diffstat (limited to 'tests/scale.test')
| -rw-r--r-- | tests/scale.test | 226 |
1 files changed, 113 insertions, 113 deletions
diff --git a/tests/scale.test b/tests/scale.test index f08015e..7d42070 100644 --- a/tests/scale.test +++ b/tests/scale.test @@ -30,7 +30,7 @@ test scale-1.1 {configuration options} -body { .s configure -activebackground [lindex [.s configure -activebackground] 3] } -result {#ff0000} test scale-1.2 {configuration options} -body { - .s configure -activebackground non-existent + .s configure -activebackground non-existent } -returnCodes error -result {unknown color name "non-existent"} test scale-1.3 {configuration options} -body { .s configure -background #ff0000 @@ -39,7 +39,7 @@ test scale-1.3 {configuration options} -body { .s configure -background [lindex [.s configure -background] 3] } -result {#ff0000} test scale-1.4 {configuration options} -body { - .s configure -background non-existent + .s configure -background non-existent } -returnCodes error -result {unknown color name "non-existent"} test scale-1.5 {configuration options} -body { .s configure -bd 4 @@ -48,7 +48,7 @@ test scale-1.5 {configuration options} -body { .s configure -bd [lindex [.s configure -bd] 3] } -result 4 test scale-1.6 {configuration options} -body { - .s configure -bd badValue + .s configure -bd badValue } -returnCodes error -result {expected screen distance but got "badValue"} test scale-1.7 {configuration options} -body { .s configure -bigincrement 12.5 @@ -57,7 +57,7 @@ test scale-1.7 {configuration options} -body { .s configure -bigincrement [lindex [.s configure -bigincrement] 3] } -result {12.5} test scale-1.8 {configuration options} -body { - .s configure -bigincrement badValue + .s configure -bigincrement badValue } -returnCodes error -result {expected floating-point number but got "badValue"} test scale-1.9 {configuration options} -body { .s configure -bg #ff0000 @@ -66,16 +66,16 @@ test scale-1.9 {configuration options} -body { .s configure -bg [lindex [.s configure -bg] 3] } -result {#ff0000} test scale-1.10 {configuration options} -body { - .s configure -bg non-existent + .s configure -bg non-existent } -returnCodes error -result {unknown color name "non-existent"} test scale-1.11 {configuration options} -body { .s configure -borderwidth 1.3 .s cget -borderwidth } -cleanup { .s configure -borderwidth [lindex [.s configure -borderwidth] 3] -} -result 1 +} -result 1.3 test scale-1.12 {configuration options} -body { - .s configure -borderwidth badValue + .s configure -borderwidth badValue } -returnCodes error -result {expected screen distance but got "badValue"} test scale-1.13 {configuration options} -body { .s configure -command {set x} @@ -90,7 +90,7 @@ test scale-1.15 {configuration options} -body { .s configure -cursor [lindex [.s configure -cursor] 3] } -result {arrow} test scale-1.16 {configuration options} -body { - .s configure -cursor badValue + .s configure -cursor badValue } -returnCodes error -result {bad cursor spec "badValue"} test scale-1.17 {configuration options} -body { .s configure -digits 5 @@ -99,7 +99,7 @@ test scale-1.17 {configuration options} -body { .s configure -digits [lindex [.s configure -digits] 3] } -result 5 test scale-1.18 {configuration options} -body { - .s configure -digits badValue + .s configure -digits badValue } -returnCodes error -result {expected integer but got "badValue"} test scale-1.19 {configuration options} -body { .s configure -fg #00ff00 @@ -108,7 +108,7 @@ test scale-1.19 {configuration options} -body { .s configure -fg [lindex [.s configure -fg] 3] } -result {#00ff00} test scale-1.20 {configuration options} -body { - .s configure -fg badValue + .s configure -fg badValue } -returnCodes error -result {unknown color name "badValue"} test scale-1.21 {configuration options} -body { .s configure -font fixed @@ -123,7 +123,7 @@ test scale-1.23 {configuration options} -body { .s configure -foreground [lindex [.s configure -foreground] 3] } -result {green} test scale-1.24 {configuration options} -body { - .s configure -foreground badValue + .s configure -foreground badValue } -returnCodes error -result {unknown color name "badValue"} test scale-1.25 {configuration options} -body { .s configure -from -15.0 @@ -132,7 +132,7 @@ test scale-1.25 {configuration options} -body { .s configure -from [lindex [.s configure -from] 3] } -result {-15.0} test scale-1.26 {configuration options} -body { - .s configure -from badValue + .s configure -from badValue } -returnCodes error -result {expected floating-point number but got "badValue"} test scale-1.27 {configuration options} -body { .s configure -highlightbackground #112233 @@ -141,7 +141,7 @@ test scale-1.27 {configuration options} -body { .s configure -highlightbackground [lindex [.s configure -highlightbackground] 3] } -result {#112233} test scale-1.28 {configuration options} -body { - .s configure -highlightbackground ugly + .s configure -highlightbackground ugly } -returnCodes error -result {unknown color name "ugly"} test scale-1.29 {configuration options} -body { .s configure -highlightcolor #123456 @@ -150,7 +150,7 @@ test scale-1.29 {configuration options} -body { .s configure -highlightcolor [lindex [.s configure -highlightcolor] 3] } -result {#123456} test scale-1.30 {configuration options} -body { - .s configure -highlightcolor non-existent + .s configure -highlightcolor non-existent } -returnCodes error -result {unknown color name "non-existent"} test scale-1.31 {configuration options} -body { .s configure -highlightthickness 2 @@ -159,7 +159,7 @@ test scale-1.31 {configuration options} -body { .s configure -highlightthickness [lindex [.s configure -highlightthickness] 3] } -result 2 test scale-1.32 {configuration options} -body { - .s configure -highlightthickness badValue + .s configure -highlightthickness badValue } -returnCodes error -result {expected screen distance but got "badValue"} test scale-1.33 {configuration options} -body { .s configure -label {Some text} @@ -174,7 +174,7 @@ test scale-1.35 {configuration options} -body { .s configure -length [lindex [.s configure -length] 3] } -result 130 test scale-1.36 {configuration options} -body { - .s configure -length badValue + .s configure -length badValue } -returnCodes error -result {expected screen distance but got "badValue"} test scale-1.37 {configuration options} -body { .s configure -orient horizontal @@ -183,7 +183,7 @@ test scale-1.37 {configuration options} -body { .s configure -orient [lindex [.s configure -orient] 3] } -result {horizontal} test scale-1.38 {configuration options} -body { - .s configure -orient badValue + .s configure -orient badValue } -returnCodes error -result {bad orient "badValue": must be horizontal or vertical} test scale-1.39 {configuration options} -body { .s configure -orient horizontal @@ -198,7 +198,7 @@ test scale-1.41 {configuration options} -body { .s configure -relief [lindex [.s configure -relief] 3] } -result {ridge} test scale-1.42 {configuration options} -body { - .s configure -relief badValue + .s configure -relief badValue } -returnCodes error -result {bad relief "badValue": must be flat, groove, raised, ridge, solid, or sunken} test scale-1.43 {configuration options} -body { .s configure -repeatdelay 14 @@ -207,7 +207,7 @@ test scale-1.43 {configuration options} -body { .s configure -repeatdelay [lindex [.s configure -repeatdelay] 3] } -result 14 test scale-1.44 {configuration options} -body { - .s configure -repeatdelay bogus + .s configure -repeatdelay bogus } -returnCodes error -result {expected integer but got "bogus"} test scale-1.45 {configuration options} -body { .s configure -repeatinterval 14 @@ -216,7 +216,7 @@ test scale-1.45 {configuration options} -body { .s configure -repeatinterval [lindex [.s configure -repeatinterval] 3] } -result 14 test scale-1.46 {configuration options} -body { - .s configure -repeatinterval bogus + .s configure -repeatinterval bogus } -returnCodes error -result {expected integer but got "bogus"} test scale-1.47 {configuration options} -body { .s configure -resolution 2.0 @@ -225,7 +225,7 @@ test scale-1.47 {configuration options} -body { .s configure -resolution [lindex [.s configure -resolution] 3] } -result {2.0} test scale-1.48 {configuration options} -body { - .s configure -resolution badValue + .s configure -resolution badValue } -returnCodes error -result {expected floating-point number but got "badValue"} test scale-1.49 {configuration options} -body { .s configure -showvalue 0 @@ -234,7 +234,7 @@ test scale-1.49 {configuration options} -body { .s configure -showvalue [lindex [.s configure -showvalue] 3] } -result 0 test scale-1.50 {configuration options} -body { - .s configure -showvalue badValue + .s configure -showvalue badValue } -returnCodes error -result {expected boolean value but got "badValue"} test scale-1.51 {configuration options} -body { .s configure -sliderlength 86 @@ -243,7 +243,7 @@ test scale-1.51 {configuration options} -body { .s configure -sliderlength [lindex [.s configure -sliderlength] 3] } -result 86 test scale-1.52 {configuration options} -body { - .s configure -sliderlength badValue + .s configure -sliderlength badValue } -returnCodes error -result {expected screen distance but got "badValue"} test scale-1.53 {configuration options} -body { .s configure -sliderrelief raised @@ -252,7 +252,7 @@ test scale-1.53 {configuration options} -body { .s configure -sliderrelief [lindex [.s configure -sliderrelief] 3] } -result {raised} test scale-1.54 {configuration options} -body { - .s configure -sliderrelief badValue + .s configure -sliderrelief badValue } -returnCodes error -result {bad relief "badValue": must be flat, groove, raised, ridge, solid, or sunken} test scale-1.55 {configuration options} -body { .s configure -state d @@ -261,7 +261,7 @@ test scale-1.55 {configuration options} -body { .s configure -state [lindex [.s configure -state] 3] } -result {disabled} test scale-1.56 {configuration options} -body { - .s configure -state badValue + .s configure -state badValue } -returnCodes error -result {bad state "badValue": must be active, disabled, or normal} test scale-1.57 {configuration options} -body { .s configure -state n @@ -282,7 +282,7 @@ test scale-1.61 {configuration options} -body { .s configure -tickinterval [lindex [.s configure -tickinterval] 3] } -result {4.0} test scale-1.62 {configuration options} -body { - .s configure -tickinterval badValue + .s configure -tickinterval badValue } -returnCodes error -result {expected floating-point number but got "badValue"} test scale-1.63 {configuration options} -body { .s configure -to 14.9 @@ -291,7 +291,7 @@ test scale-1.63 {configuration options} -body { .s configure -to [lindex [.s configure -to] 3] } -result {15.0} test scale-1.64 {configuration options} -body { - .s configure -to badValue + .s configure -to badValue } -returnCodes error -result {expected floating-point number but got "badValue"} test scale-1.65 {configuration options} -body { .s configure -troughcolor #ff0000 @@ -300,7 +300,7 @@ test scale-1.65 {configuration options} -body { .s configure -troughcolor [lindex [.s configure -troughcolor] 3] } -result {#ff0000} test scale-1.66 {configuration options} -body { - .s configure -troughcolor non-existent + .s configure -troughcolor non-existent } -returnCodes error -result {unknown color name "non-existent"} test scale-1.67 {configuration options} -body { .s configure -variable x @@ -315,7 +315,7 @@ test scale-1.69 {configuration options} -body { .s configure -width [lindex [.s configure -width] 3] } -result 32 test scale-1.70 {configuration options} -body { - .s configure -width badValue + .s configure -width badValue } -returnCodes error -result {expected screen distance but got "badValue"} destroy .s @@ -556,7 +556,7 @@ test scale-5.5 {ConfigureScale procedure} -setup { } -body { scale .s -from 1.11 -to 1.89 -resolution .1 -tickinterval .76 list [format %.1f [.s cget -from]] [format %.1f [.s cget -to]] \ - [format %.1f [.s cget -tickinterval]] + [format %.1f [.s cget -tickinterval]] } -cleanup { deleteWindows } -result {1.1 1.9 0.8} @@ -726,7 +726,7 @@ test scale-7.3 {ComputeScaleGeometry procedure} -constraints { deleteWindows } -body { scale .s -from 0 -to 1000 -orient vertical -showvalue 0 -width 10 \ - -sliderlength 10 + -sliderlength 10 pack .s update list [winfo reqwidth .s] [winfo reqheight .s] @@ -739,7 +739,7 @@ test scale-7.4 {ComputeScaleGeometry procedure} -constraints { deleteWindows } -body { scale .s -from 0 -to 1000 -orient vertical -showvalue 0 -bd 5 \ - -relief sunken + -relief sunken pack .s update list [winfo reqwidth .s] [winfo reqheight .s] @@ -764,7 +764,7 @@ test scale-7.6 {ComputeScaleGeometry procedure} -constraints { deleteWindows } -body { scale .s -from 0 -to 1000 -label "Long string" -orient horizontal \ - -tick 500 + -tick 500 pack .s update list [winfo reqwidth .s] [winfo reqheight .s] @@ -787,7 +787,7 @@ test scale-7.8 {ComputeScaleGeometry procedure} -setup { deleteWindows } -body { scale .s -from 0 -to 1000 -orient horizontal -showvalue 0 -bd 5 \ - -relief raised -highlightthickness 2 + -relief raised -highlightthickness 2 pack .s update list [winfo reqwidth .s] [winfo reqheight .s] @@ -806,7 +806,7 @@ test scale-8.1 {ScaleElement procedure} -constraints { .s set 30 update list [.s identify 53 52] [.s identify 54 52] [.s identify 70 52] \ - [.s identify 71 52] + [.s identify 71 52] } -cleanup { deleteWindows } -result {{} trough1 trough1 {}} @@ -820,7 +820,7 @@ test scale-8.2 {ScaleElement procedure} -constraints { .s set 30 update list [.s identify 60 2] [.s identify 60 3] [.s identify 60 302] \ - [.s identify 60 303] + [.s identify 60 303] } -cleanup { deleteWindows } -result {{} trough1 trough2 {}} @@ -834,7 +834,7 @@ test scale-8.3 {ScaleElement procedure} -constraints { .s set 30 update list [.s identify 60 83] [.s identify 60 84] [.s identify 60 113] \ - [.s identify 60 114] \ + [.s identify 60 114] \ } -cleanup { deleteWindows } -result {trough1 slider slider trough2} @@ -842,12 +842,12 @@ test scale-8.4 {ScaleElement procedure} -setup { deleteWindows } -body { scale .s -from 0 -to 100 -orient vertical -bd 4 -width 10 \ - -highlightthickness 1 -length 300 -showvalue 0 + -highlightthickness 1 -length 300 -showvalue 0 pack .s .s set 30 update list [.s identify 4 40] [.s identify 5 40] [.s identify 22 40] \ - [.s identify 23 40] \ + [.s identify 23 40] \ } -cleanup { deleteWindows } -result {{} trough1 trough1 {}} @@ -857,13 +857,13 @@ test scale-8.5 {ScaleElement procedure} -constraints { deleteWindows } -body { scale .s -from 0 -to 100 -orient horizontal -bd 1 \ - -highlightthickness 2 -tick 20 -sliderlength 20 \ - -length 200 -label Test + -highlightthickness 2 -tick 20 -sliderlength 20 \ + -length 200 -label Test pack .s .s set 30 update list [.s identify 150 36] [.s identify 150 37] [.s identify 150 53] \ - [.s identify 150 54] + [.s identify 150 54] } -cleanup { deleteWindows } -result {{} trough2 trough2 {}} @@ -873,12 +873,12 @@ test scale-8.6 {ScaleElement procedure} -constraints { deleteWindows } -body { scale .s -from 0 -to 100 -orient horizontal -bd 2 \ - -highlightthickness 1 -tick 20 -length 200 + -highlightthickness 1 -tick 20 -length 200 pack .s .s set 30 update list [.s identify 150 20] [.s identify 150 21] [.s identify 150 39] \ - [.s identify 150 40] + [.s identify 150 40] } -cleanup { deleteWindows } -result {{} trough2 trough2 {}} @@ -886,12 +886,12 @@ test scale-8.7 {ScaleElement procedure} -setup { deleteWindows } -body { scale .s -from 0 -to 100 -orient horizontal -bd 4 -highlightthickness 2 \ - -length 200 -width 10 -showvalue 0 + -length 200 -width 10 -showvalue 0 pack .s .s set 30 update list [.s identify 30 5] [.s identify 30 6] [.s identify 30 23] \ - [.s identify 30 24] + [.s identify 30 24] } -cleanup { deleteWindows } -result {{} trough1 trough1 {}} @@ -899,12 +899,12 @@ test scale-8.8 {ScaleElement procedure} -setup { deleteWindows } -body { scale .s -from 0 -to 100 -orient horizontal -bd 1 -highlightthickness 2 \ - -tick 20 -sliderlength 20 -length 200 -label Test -showvalue 0 + -tick 20 -sliderlength 20 -length 200 -label Test -showvalue 0 pack .s .s set 30 update list [.s identify 2 28] [.s identify 3 28] [.s identify 202 28] \ - [.s identify 203 28] + [.s identify 203 28] } -cleanup { deleteWindows } -result {{} trough1 trough2 {}} @@ -912,12 +912,12 @@ test scale-8.9 {ScaleElement procedure} -setup { deleteWindows } -body { scale .s -from 0 -to 100 -orient horizontal -bd 1 -highlightthickness 2 \ - -tick 20 -sliderlength 20 -length 200 -label Test -showvalue 0 + -tick 20 -sliderlength 20 -length 200 -label Test -showvalue 0 pack .s .s set 80 update list [.s identify 145 28] [.s identify 146 28] [.s identify 165 28] \ - [.s identify 166 28] + [.s identify 166 28] } -cleanup { deleteWindows } -result {trough1 slider slider trough2} @@ -968,7 +968,7 @@ test scale-9.8 {PixelToValue procedure} -body { } -result 100 test scale-9.9 {PixelToValue procedure} -body { .s configure -from 0 -to 100 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal + -orient horizontal update .s get 76 152 } -result 65 @@ -981,7 +981,7 @@ test scale-10.1 {ValueToPixel procedure} -constraints { deleteWindows } -body { scale .s -from 0 -to 100 -sliderlength 20 -length 124 -bd 2 \ - -orient horizontal -label Test -tick 20 + -orient horizontal -label Test -tick 20 pack .s update list [.s coords -10] [.s coords 40] [.s coords 1000] @@ -994,7 +994,7 @@ test scale-10.2 {ValueToPixel procedure} -constraints { deleteWindows } -body { scale .s -from 100 -to 0 -sliderlength 20 -length 122 -bd 1 \ - -orient vertical -label Test -tick 20 + -orient vertical -label Test -tick 20 pack .s update list [.s coords -10] [.s coords 40] [.s coords 1000] @@ -1007,11 +1007,11 @@ test scale-11.1 {ScaleEventProc procedure} -setup { deleteWindows } -body { proc killScale value { - global x - if {$value > 30} { - destroy .s1 - lappend x [winfo exists .s1] [info commands .s1] - } + global x + if {$value > 30} { + destroy .s1 + lappend x [winfo exists .s1] [info commands .s1] + } } set x initial scale .s1 -from 0 -to 100 -command killScale @@ -1083,8 +1083,8 @@ test scale-13.5 {SetScaleValue procedure} -body { } -result 100 test scale-13.6 {SetScaleValue procedure} -body { proc varTrace args { - global traceInfo - set traceInfo $args + global traceInfo + set traceInfo $args } .s configure -from 0 -to 100 -command {set x} -variable y update @@ -1106,78 +1106,78 @@ pack [scale .s] update test scale-14.1 {RoundValueToResolution procedure} -body { .s configure -from 0 -to 100 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 4.0 + -orient horizontal -resolution 4.0 update .s get 84 152 } -result 72 test scale-14.2 {RoundValueToResolution procedure} -body { .s configure -from 0 -to 100 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 4.0 + -orient horizontal -resolution 4.0 update .s get 86 152 } -result 76 test scale-14.3 {RoundValueToResolution procedure} -body { .s configure -from 100 -to 0 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 4.0 + -orient horizontal -resolution 4.0 update .s get 84 152 } -result 28 test scale-14.4 {RoundValueToResolution procedure} -body { .s configure -from 100 -to 0 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 4.0 + -orient horizontal -resolution 4.0 update .s get 86 152 } -result 24 test scale-14.5 {RoundValueToResolution procedure} -body { .s configure -from -100 -to 0 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 4.0 + -orient horizontal -resolution 4.0 update .s get 84 152 } -result -28 test scale-14.6 {RoundValueToResolution procedure} -body { .s configure -from -100 -to 0 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 4.0 + -orient horizontal -resolution 4.0 update .s get 86 152 } -result -24 test scale-14.7 {RoundValueToResolution procedure} -body { .s configure -from 0 -to -100 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 4.0 + -orient horizontal -resolution 4.0 update .s get 84 152 } -result -72 test scale-14.8 {RoundValueToResolution procedure} -body { .s configure -from 0 -to -100 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 4.0 + -orient horizontal -resolution 4.0 update .s get 86 152 } -result -76 test scale-14.9 {RoundValueToResolution procedure} -body { .s configure -from 0 -to 2.25 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 0 + -orient horizontal -resolution 0 update .s get 84 152 } -result {1.64} test scale-14.10 {RoundValueToResolution procedure} -body { .s configure -from 0 -to 2.25 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 0 + -orient horizontal -resolution 0 update .s get 86 152 } -result {1.69} test scale-14.11 {RoundValueToResolution procedure} -body { .s configure -from 0 -to 225 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 0 -digits 5 + -orient horizontal -resolution 0 -digits 5 update .s get 84 152 } -result {164.25} test scale-14.12 {RoundValueToResolution procedure} -body { .s configure -from 0 -to 225 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 0 -digits 5 + -orient horizontal -resolution 0 -digits 5 update .s get 86 152 } -result {168.75} @@ -1211,7 +1211,7 @@ test scale-14a.2 {RoundValueToResolution, RoundIntervalToResolution procedures} update } -body { .s configure -length 400 -bd 0 -from -1.5 -to 1.5 -resolution 1 \ - -tickinterval 1 -digits 2 + -tickinterval 1 -digits 2 update .s get 250 0 } -cleanup { @@ -1245,7 +1245,7 @@ test scale-15.3 {ScaleVarProc procedure} -setup { set y 40q } -cleanup { deleteWindows -} -returnCodes error -result {can't set "y": can't assign non-numeric value to scale variable} +} -returnCodes error -result {can't set "y": cannot assign a non-numeric value to a scale variable} test scale-15.4 {ScaleVarProc procedure} -setup { deleteWindows } -body { @@ -1266,7 +1266,7 @@ test scale-15.5 {ScaleVarProc procedure} -setup { set y x } -cleanup { deleteWindows -} -returnCodes error -result {can't set "y": can't assign non-numeric value to scale variable} +} -returnCodes error -result {can't set "y": cannot assign a non-numeric value to a scale variable} test scale-15.6 {ScaleVarProc procedure} -setup { deleteWindows } -body { @@ -1283,7 +1283,7 @@ test scale-15.7 {ScaleVarProc procedure, variable deleted} -setup { } -body { set y 6 scale .s -from 10 -to 0 -variable y -orient horizontal -length 150 \ - -command "set x" + -command "set x" pack .s update set x untouched @@ -1298,7 +1298,7 @@ test scale-15.8 {ScaleVarProc procedure, don't call -command} -setup { } -body { set y 6 scale .s -from 0 -to 100 -variable y -orient horizontal -length 150 \ - -command "set x" + -command "set x" pack .s update set x untouched @@ -1364,10 +1364,10 @@ test scale-18.2 {Scale button 1 events [Bug 787065]} -setup { pack .s tkwait visibility .s list [catch { - event generate .s <Button-1> -x 0 -y 0 - event generate .s <ButtonRelease-1> -x 0 -y 0 - update - set ::error + event generate .s <Button-1> -x 0 -y 0 + event generate .s <ButtonRelease-1> -x 0 -y 0 + update + set ::error } msg] $msg } -cleanup { unset ::error @@ -1385,10 +1385,10 @@ test scale-18.3 {Scale button 2 events [Bug 787065]} -setup { pack .s tkwait visibility .s list [catch { - event generate .s <Button-2> -x 0 -y 0 - event generate .s <ButtonRelease-2> -x 0 -y 0 - update - set ::error + event generate .s <Button-2> -x 0 -y 0 + event generate .s <ButtonRelease-2> -x 0 -y 0 + update + set ::error } msg] $msg } -cleanup { unset ::error @@ -1399,7 +1399,7 @@ test scale-18.3 {Scale button 2 events [Bug 787065]} -setup { test scale-18.4 {Bug [415415ffff] - Long callback: One click -> Several steps} -setup { catch {destroy .s} scale .s -from 0 -to 5 -resolution 1 -variable x1 -orient horizontal -length 100 \ - -command longCmd -repeatdelay 300 + -command longCmd -repeatdelay 300 pack .s update proc longCmd {unused} { @@ -1418,35 +1418,35 @@ test scale-18.4 {Bug [415415ffff] - Long callback: One click -> Several steps} - test scale-19 {Bug [3529885fff] - Click in through goes in wrong direction} \ -setup { - catch {destroy .s} - catch {destroy .s1 .s2 .s3 .s4} - unset -nocomplain x1 x2 x3 x4 x y - scale .s1 -from 0 -to 100 -resolution 1 -variable x1 -digits 4 -orient horizontal -length 100 - scale .s2 -from 0 -to 100 -resolution -1 -variable x2 -digits 4 -orient horizontal -length 100 - scale .s3 -from 100 -to 0 -resolution 1 -variable x3 -digits 4 -orient horizontal -length 100 - scale .s4 -from 100 -to 0 -resolution -1 -variable x4 -digits 4 -orient horizontal -length 100 - pack .s1 .s2 .s3 .s4 -side left - update + catch {destroy .s} + catch {destroy .s1 .s2 .s3 .s4} + unset -nocomplain x1 x2 x3 x4 x y + scale .s1 -from 0 -to 100 -resolution 1 -variable x1 -digits 4 -orient horizontal -length 100 + scale .s2 -from 0 -to 100 -resolution -1 -variable x2 -digits 4 -orient horizontal -length 100 + scale .s3 -from 100 -to 0 -resolution 1 -variable x3 -digits 4 -orient horizontal -length 100 + scale .s4 -from 100 -to 0 -resolution -1 -variable x4 -digits 4 -orient horizontal -length 100 + pack .s1 .s2 .s3 .s4 -side left + update } \ -body { - foreach {x y} [.s1 coord 50] {} - event generate .s1 <Button-1> -x $x -y $y - event generate .s1 <ButtonRelease-1> -x $x -y $y - foreach {x y} [.s2 coord 50] {} - event generate .s2 <Button-1> -x $x -y $y - event generate .s2 <ButtonRelease-1> -x $x -y $y - foreach {x y} [.s3 coord 50] {} - event generate .s3 <Button-1> -x $x -y $y - event generate .s3 <ButtonRelease-1> -x $x -y $y - foreach {x y} [.s4 coord 50] {} - event generate .s4 <Button-1> -x $x -y $y - event generate .s4 <ButtonRelease-1> -x $x -y $y - update - list $x1 $x2 $x3 $x4 + foreach {x y} [.s1 coord 50] {} + event generate .s1 <Button-1> -x $x -y $y + event generate .s1 <ButtonRelease-1> -x $x -y $y + foreach {x y} [.s2 coord 50] {} + event generate .s2 <Button-1> -x $x -y $y + event generate .s2 <ButtonRelease-1> -x $x -y $y + foreach {x y} [.s3 coord 50] {} + event generate .s3 <Button-1> -x $x -y $y + event generate .s3 <ButtonRelease-1> -x $x -y $y + foreach {x y} [.s4 coord 50] {} + event generate .s4 <Button-1> -x $x -y $y + event generate .s4 <ButtonRelease-1> -x $x -y $y + update + list $x1 $x2 $x3 $x4 } \ -cleanup { - unset x1 x2 x3 x4 x y - destroy .s1 .s2 .s3 .s4 + unset x1 x2 x3 x4 x y + destroy .s1 .s2 .s3 .s4 } \ -result {1.0 1.0 1.0 1.0} @@ -1596,7 +1596,7 @@ test scale-22.1 {Bug [5d991b822e]} { set var INIT scale .b -variable var trace add variable var unset {apply {args { - .b configure -variable {} + .b configure -variable {} }}} pack .b bind .b <Configure> {unset var} @@ -1608,7 +1608,7 @@ test scale-22.2 {Bug [5d991b822e]} { set var INIT scale .b -variable var trace add variable var unset {apply {args { - .b configure -variable new + .b configure -variable new }}} pack .b bind .b <Configure> {unset -nocomplain var} |
