diff options
Diffstat (limited to 'tests/bind.test')
-rw-r--r-- | tests/bind.test | 372 |
1 files changed, 158 insertions, 214 deletions
diff --git a/tests/bind.test b/tests/bind.test index 374ef9b..892ba36 100644 --- a/tests/bind.test +++ b/tests/bind.test @@ -77,10 +77,10 @@ test bind-1.7 {bind command} -body { } -result {test script more text} test bind-1.8 {bind command} -body { - bind .t <gorp-> {test script} + bind .t <gorp-> {test script} } -returnCodes error -result {bad event type or keysym "gorp"} test bind-1.9 {bind command} -body { - catch {bind .t <gorp-> {test script}} + catch {bind .t <gorp-> {test script}} bind .t } -result {} test bind-1.10 {bind command} -body { @@ -141,10 +141,10 @@ test bind-2.8 {bindtags command} -body { test bind-2.9 {bindtags command} -body { frame .t.f bindtags .t.f {a b c} - bindtags .t.f "\{" + bindtags .t.f "\{" } -cleanup { destroy .t.f -} -returnCodes error -result {unmatched open brace in list} +} -returnCodes error -result {unmatched open brace in list} test bind-2.10 {bindtags command} -body { frame .t.f bindtags .t.f {a b c} @@ -156,10 +156,10 @@ test bind-2.10 {bindtags command} -body { test bind-2.11 {bindtags command} -body { frame .t.f bindtags .t.f {a b c} - bindtags .t.f "a .gorp b" + bindtags .t.f "a .gorp b" } -cleanup { destroy .t.f -} -returnCodes ok +} -returnCodes ok test bind-2.12 {bindtags command} -body { frame .t.f bindtags .t.f {a b c} @@ -199,7 +199,7 @@ test bind-4.1 {TkBindEventProc procedure} -setup { bind {a b} <Enter> {lappend x "%W enter {a b}"} bind .t <Enter> {lappend x "%W enter .t"} bind .t.f <Enter> {lappend x "%W enter .t.f"} - + event generate .t.f <Enter> return $x } -cleanup { @@ -219,9 +219,9 @@ test bind-4.2 {TkBindEventProc procedure} -setup { bind {a b} <Enter> {lappend x "%W enter {a b}"} bind .t <Enter> {lappend x "%W enter .t"} bind .t.f <Enter> {lappend x "%W enter .t.f"} - + bindtags .t.f {.t.f {a b} xyz} - event generate .t.f <Enter> + event generate .t.f <Enter> return $x } -cleanup { destroy .t.f @@ -235,7 +235,7 @@ test bind-4.3 {TkBindEventProc procedure} -body { bind xyz <Enter> {lappend x "%W enter xyz"} bind {a b} <Enter> {lappend x "%W enter {a b}"} bind .t <Enter> {lappend x "%W enter .t"} - + event generate .t <Enter> return $x } -cleanup { @@ -255,7 +255,7 @@ test bind-4.4 {TkBindEventProc procedure} -setup { bind xyz <Enter> {lappend x "%W enter xyz"} bind {a b} <Enter> {lappend x "%W enter {a b}"} bind .t <Enter> {lappend x "%W enter .t"} - + bindtags .t.f {.t.f .t.f2 .t.f3} bind .t.f <Enter> {lappend x "%W enter .t.f"} bind .t.f3 <Enter> {lappend x "%W enter .t.f3"} @@ -279,7 +279,7 @@ test bind-4.5 {TkBindEventProc procedure} -setup { bind {a b} <Enter> {lappend x "%W enter {a b}"} bind .t <Enter> {lappend x "%W enter .t"} bindtags .t.f {a b c d e f g h i j k l m n o p q r s t u v w x y z} - + event generate .t.f <Enter> } -cleanup { destroy .t.f @@ -383,7 +383,7 @@ test bind-10.2 {Tk_GetBinding procedure} -body { } -result {Test} test bind-11.1 {Tk_GetAllBindings procedure} -body { - frame .t.f + frame .t.f foreach i "! a \\\{ ~ <Delete> <space> <<Paste>> <Tab> <Linefeed> <less> <Meta-a> <Acircumflex>" { bind .t.f $i Test } @@ -392,7 +392,7 @@ test bind-11.1 {Tk_GetAllBindings procedure} -body { destroy .t.f } -result {! <<Paste>> <Key-Acircumflex> <Key-Delete> <Key-Linefeed> <Key-Tab> <Key-less> <Key-space> <Meta-Key-a> a \{ ~} test bind-11.2 {Tk_GetAllBindings procedure} -body { - frame .t.f + frame .t.f foreach i "<Double-1> <Triple-1> <Meta-Control-a> <Double-Alt-Enter> <1>" { bind .t.f $i Test } @@ -401,7 +401,7 @@ test bind-11.2 {Tk_GetAllBindings procedure} -body { destroy .t.f } -result {<Button-1> <Control-Meta-Key-a> <Double-Alt-Enter> <Double-Button-1> <Triple-Button-1>} test bind-11.3 {Tk_GetAllBindings procedure} -body { - frame .t.f + frame .t.f foreach i "<Double-Triple-1> abcd a<Leave>b" { bind .t.f $i Test } @@ -435,7 +435,7 @@ test bind-13.1 {Tk_BindEvent procedure} -setup { bind Test : {lappend x "%W %K Test :"} bind all _ {lappend x "%W %K all _"} bind .t.f : {lappend x "%W %K .t.f :"} - + event generate .t.f <Key-colon> event generate .t.f <Key-plus> event generate .t.f <Key-underscore> @@ -458,7 +458,7 @@ test bind-13.2 {Tk_BindEvent procedure} -setup { bind Test <KeyPress> {lappend x "%W %K Test press any"; break} bind all <KeyPress> {continue; lappend x "%W %K all press any"} bind .t.f : {lappend x "%W %K .t.f pressed colon"} - + event generate .t.f <Key-colon> return $x } -cleanup { @@ -514,11 +514,11 @@ test bind-13.5 {Tk_BindEvent procedure} -body { frame .t.g -gorp foo } -cleanup { bind all <Destroy> {} -} -returnCodes error -result {unknown option "-gorp"} +} -returnCodes error -result {unknown option "-gorp"} test bind-13.6 {Tk_BindEvent procedure} -body { bind all <Destroy> {lappend x "%W destroyed"} set x {} - catch {frame .t.g -gorp foo} + catch {frame .t.g -gorp foo} return $x } -cleanup { bind all <Destroy> {} @@ -599,10 +599,10 @@ test bind-13.11 {Tk_BindEvent procedure: collapse Motions} -setup { set x {} } -body { bind .t.f <Motion> "lappend x Motion%#(%x,%y)" - event generate .t.f <Motion> -serial 100 -x 100 -y 200 -when tail + event generate .t.f <Motion> -serial 100 -x 100 -y 200 -when tail update event generate .t.f <Motion> -serial 101 -x 200 -y 300 -when tail - event generate .t.f <Motion> -serial 102 -x 300 -y 400 -when tail + event generate .t.f <Motion> -serial 102 -x 300 -y 400 -when tail update return $x } -cleanup { @@ -616,10 +616,10 @@ test bind-13.12 {Tk_BindEvent procedure: collapse repeating modifiers} -setup { } -body { bind .t.f <Key> "lappend x %K%#" bind .t.f <KeyRelease> "lappend x %K%#" - event generate .t.f <Key-Shift_L> -serial 100 -when tail - event generate .t.f <KeyRelease-Shift_L> -serial 101 -when tail - event generate .t.f <Key-Shift_L> -serial 102 -when tail - event generate .t.f <KeyRelease-Shift_L> -serial 103 -when tail + event generate .t.f <Key-Shift_L> -serial 100 -when tail + event generate .t.f <KeyRelease-Shift_L> -serial 101 -when tail + event generate .t.f <Key-Shift_L> -serial 102 -when tail + event generate .t.f <KeyRelease-Shift_L> -serial 103 -when tail update } -cleanup { destroy .t.f @@ -855,7 +855,7 @@ test bind-13.27 {Tk_BindEvent procedure: no detail virtual pattern list} -setup set x {} } -body { bind .t.f <Button-2> {set x Button-2} - event generate .t.f <Button-2> + event generate .t.f <Button-2> return $x } -cleanup { destroy .t.f @@ -1019,7 +1019,7 @@ test bind-13.43 {Tk_BindEvent procedure: break in script} -setup { } -result {b1} test bind-13.45 {Tk_BindEvent procedure: error in script} -setup { proc bgerror msg { - global x + global x lappend x $msg } frame .t.f -class Test -width 150 -height 100 @@ -1208,7 +1208,7 @@ test bind-15.11 {MatchPatterns procedure, modifier checks} -setup { } -cleanup { destroy .t.f } -result {0} -test bind-15.12 {MatchPatterns procedure, ignore modifier presses and releases} -constraints { +test bind-15.12 {MatchPatterns procedure, ignore modifier presses and releases} -constraints { nonPortable } -setup { frame .t.f -class Test -width 150 -height 100 @@ -1249,7 +1249,7 @@ test bind-15.14 {MatchPatterns procedure, checking "nearby"} -setup { } -body { bind .t.f <Double-1> {set x 1} set x 0 - event generate .t.f <Button-2> + event generate .t.f <Button-2> event generate .t.f <ButtonRelease-2> event generate .t.f <Button-1> -x 30 -y 40 event generate .t.f <Button-1> -x 31 -y 39 @@ -1266,7 +1266,7 @@ test bind-15.15 {MatchPatterns procedure, checking "nearby"} -setup { } -body { bind .t.f <Double-1> {set x 1} set x 0 - event generate .t.f <Button-2> + event generate .t.f <Button-2> event generate .t.f <ButtonRelease-2> event generate .t.f <Button-1> -x 30 -y 40 event generate .t.f <Button-1> -x 29 -y 41 @@ -1283,7 +1283,7 @@ test bind-15.16 {MatchPatterns procedure, checking "nearby"} -setup { } -body { bind .t.f <Double-1> {set x 1} set x 0 - event generate .t.f <Button-2> + event generate .t.f <Button-2> event generate .t.f <ButtonRelease-2> event generate .t.f <Button-1> -x 30 -y 40 event generate .t.f <Button-1> -x 40 -y 40 @@ -1300,7 +1300,7 @@ test bind-15.17 {MatchPatterns procedure, checking "nearby"} -setup { } -body { bind .t.f <Double-1> {set x 1} set x 0 - event generate .t.f <Button-2> + event generate .t.f <Button-2> event generate .t.f <ButtonRelease-2> event generate .t.f <Button-1> -x 30 -y 40 event generate .t.f <Button-1> -x 20 -y 40 @@ -1317,7 +1317,7 @@ test bind-15.18 {MatchPatterns procedure, checking "nearby"} -setup { } -body { bind .t.f <Double-1> {set x 1} set x 0 - event generate .t.f <Button-2> + event generate .t.f <Button-2> event generate .t.f <ButtonRelease-2> event generate .t.f <Button-1> -x 30 -y 40 event generate .t.f <Button-1> -x 30 -y 30 @@ -1334,7 +1334,7 @@ test bind-15.19 {MatchPatterns procedure, checking "nearby"} -setup { } -body { bind .t.f <Double-1> {set x 1} set x 0 - event generate .t.f <Button-2> + event generate .t.f <Button-2> event generate .t.f <ButtonRelease-2> event generate .t.f <Button-1> -x 30 -y 40 event generate .t.f <Button-1> -x 30 -y 50 @@ -1351,7 +1351,7 @@ test bind-15.20 {MatchPatterns procedure, checking "nearby"} -setup { } -body { bind .t.f <Double-1> {set x 1} set x 0 - event generate .t.f <Button-2> + event generate .t.f <Button-2> event generate .t.f <ButtonRelease-2> event generate .t.f <Button-1> -time 300 event generate .t.f <Button-1> -time 700 @@ -1368,7 +1368,7 @@ test bind-15.21 {MatchPatterns procedure, checking "nearby"} -setup { } -body { bind .t.f <Double-1> {set x 1} set x 0 - event generate .t.f <Button-2> + event generate .t.f <Button-2> event generate .t.f <ButtonRelease-2> event generate .t.f <Button-1> -time 300 event generate .t.f <Button-1> -time 900 @@ -2025,7 +2025,7 @@ test bind-16.34 {ExpandPercents procedure} -setup { destroy .t.f } -result {781 632} test bind-16.35 {ExpandPercents procedure} -constraints { - nonPortable + nonPortable } -setup { frame .t.f -class Test -width 150 -height 100 pack .t.f @@ -2250,7 +2250,7 @@ test bind-17.6 {event command: add with error} -body { event add <<Paste>> <Control-v> <Button-2> abc <xyz> <1> } -cleanup { event delete <<Paste>> -} -returnCodes error -result {bad event type or keysym "xyz"} +} -returnCodes error -result {bad event type or keysym "xyz"} test bind-17.7 {event command: add with error} -body { event delete <<Paste>> catch {event add <<Paste>> <Control-v> <Button-2> abc <xyz> <1>} @@ -2343,7 +2343,7 @@ test bind-18.1 {CreateVirtualEvent procedure: GetVirtualEventUid} -body { test bind-18.2 {CreateVirtualEvent procedure: FindSequence} -body { event add <<asd>> <Ctrl-v> } -returnCodes error -result {bad event type or keysym "Ctrl"} -test bind-18.3 {CreateVirtualEvent procedure: new physical} -body { +test bind-18.3 {CreateVirtualEvent procedure: new physical} -body { event delete <<xyz>> event add <<xyz>> <Control-v> event info <<xyz>> @@ -2352,7 +2352,7 @@ test bind-18.3 {CreateVirtualEvent procedure: new physical} -body { } -result {<Control-Key-v>} test bind-18.4 {CreateVirtualEvent procedure: duplicate physical} -body { event delete <<xyz>> - event add <<xyz>> <Control-v> + event add <<xyz>> <Control-v> event add <<xyz>> <Control-v> event info <<xyz>> } -cleanup { @@ -2423,13 +2423,13 @@ test bind-19.7 {DeleteVirtualEvent procedure: owns 1, delete all} -body { foreach p [event info] {event delete $p} event add <<xyz>> <Control-v> event delete <<xyz>> - event info + event info } -result {} test bind-19.8 {DeleteVirtualEvent procedure: owns 1, delete 1} -body { foreach p [event info] {event delete $p} event add <<xyz>> <Control-v> event delete <<xyz>> <Control-v> - event info + event info } -result {} test bind-19.9 {DeleteVirtualEvent procedure: owns many, delete all} -body { foreach p [event info] {event delete $p} @@ -2481,7 +2481,7 @@ test bind-19.12 {DeleteVirtualEvent procedure: owned by 1, first in chain} -setu event generate .t.f <ButtonRelease-2> event generate .t.f <Control-Button-2> event generate .t.f <Control-ButtonRelease-2> - event delete <<xyz>> + event delete <<xyz>> event generate .t.f <Button-2> event generate .t.f <ButtonRelease-2> event generate .t.f <Control-Button-2> @@ -2548,7 +2548,7 @@ test bind-19.14 {DeleteVirtualEvent procedure: owned by 1, last in chain} -setup event generate .t.f <Control-ButtonRelease-2> event generate .t.f <Shift-Button-2> event generate .t.f <Shift-ButtonRelease-2> - event delete <<xyz>> + event delete <<xyz>> event generate .t.f <Button-2> event generate .t.f <ButtonRelease-2> event generate .t.f <Control-Button-2> @@ -2584,7 +2584,7 @@ test bind-19.15 {DeleteVirtualEvent procedure: owned by many, first} -setup { event generate .t.g <ButtonRelease-2> event generate .t.h <Button-2> event generate .t.h <ButtonRelease-2> - event delete <<xyz>> + event delete <<xyz>> event generate .t.f <Button-2> event generate .t.f <ButtonRelease-2> event generate .t.g <Button-2> @@ -2656,7 +2656,7 @@ test bind-19.17 {DeleteVirtualEvent procedure: owned by many, last} -setup { event generate .t.g <ButtonRelease-2> event generate .t.h <Button-2> event generate .t.h <ButtonRelease-2> - event delete <<def>> + event delete <<def>> event generate .t.f <Button-2> event generate .t.f <ButtonRelease-2> event generate .t.g <Button-2> @@ -3393,7 +3393,7 @@ test bind-22.55 {HandleEventGenerate: options <Map> -override xyz} -setup { set x {} } -body { bind .t.f <Map> "lappend x %o" - event generate .t.f <Map> -override xyz + event generate .t.f <Map> -override xyz } -cleanup { destroy .t.f } -returnCodes error -result {expected boolean value but got "xyz"} @@ -3406,7 +3406,7 @@ test bind-22.56 {HandleEventGenerate: options <Map> -override 1} -setup { set x {} } -body { bind .t.f <Map> "lappend x %o" - event generate .t.f <Map> -override 1 + event generate .t.f <Map> -override 1 return $x } -cleanup { destroy .t.f @@ -3420,7 +3420,7 @@ test bind-22.57 {HandleEventGenerate: options <Reparent> -override 1} -setup { set x {} } -body { bind .t.f <Reparent> "lappend x %o" - event generate .t.f <Reparent> -override 1 + event generate .t.f <Reparent> -override 1 return $x } -cleanup { destroy .t.f @@ -3434,7 +3434,7 @@ test bind-22.58 {HandleEventGenerate: options <Configure> -override 1} -setup { set x {} } -body { bind .t.f <Configure> "lappend x %o" - event generate .t.f <Configure> -override 1 + event generate .t.f <Configure> -override 1 return $x } -cleanup { destroy .t.f @@ -3448,7 +3448,7 @@ test bind-22.59 {HandleEventGenerate: options <Key> -override 1} -setup { set x {} } -body { bind .t.f <Key> "lappend x %k" - event generate .t.f <Key> -override 1 + event generate .t.f <Key> -override 1 } -cleanup { destroy .t.f } -returnCodes error -result {<Key> event doesn't accept "-override" option} @@ -3461,7 +3461,7 @@ test bind-22.60 {HandleEventGenerate: options <Circulate> -place xyz} -setup { set x {} } -body { bind .t.f <Circulate> "lappend x %p" - event generate .t.f <Circulate> -place xyz + event generate .t.f <Circulate> -place xyz } -cleanup { destroy .t.f } -returnCodes error -result {bad -place value "xyz": must be PlaceOnTop, or PlaceOnBottom} @@ -3474,7 +3474,7 @@ test bind-22.61 {HandleEventGenerate: options <Circulate> -place PlaceOnTop} -se set x {} } -body { bind .t.f <Circulate> "lappend x %p" - event generate .t.f <Circulate> -place PlaceOnTop + event generate .t.f <Circulate> -place PlaceOnTop return $x } -cleanup { destroy .t.f @@ -3488,7 +3488,7 @@ test bind-22.62 {HandleEventGenerate: options <Key> -place PlaceOnTop} -setup { set x {} } -body { bind .t.f <Key> "lappend x %k" - event generate .t.f <Key> -place PlaceOnTop + event generate .t.f <Key> -place PlaceOnTop } -cleanup { destroy .t.f } -returnCodes error -result {<Key> event doesn't accept "-place" option} @@ -3501,7 +3501,7 @@ test bind-22.63 {HandleEventGenerate: options <Key> -root .xyz} -setup { set x {} } -body { bind .t.f <Key> "lappend x %R" - event generate .t.f <Key> -root .xyz + event generate .t.f <Key> -root .xyz } -cleanup { destroy .t.f } -returnCodes error -result {bad window path name ".xyz"} @@ -3514,7 +3514,7 @@ test bind-22.64 {HandleEventGenerate: options <Key> -root .t} -setup { set x {} } -body { bind .t.f <Key> "lappend x %R" - event generate .t.f <Key> -root .t + event generate .t.f <Key> -root .t expr {[winfo id .t] eq $x} } -cleanup { destroy .t.f @@ -3528,7 +3528,7 @@ test bind-22.65 {HandleEventGenerate: options <Key> -root xyz} -setup { set x {} } -body { bind .t.f <Key> "lappend x %R" - event generate .t.f <Key> -root xyz + event generate .t.f <Key> -root xyz } -cleanup { destroy .t.f } -returnCodes error -result {bad window name/identifier "xyz"} @@ -3541,7 +3541,7 @@ test bind-22.66 {HandleEventGenerate: options <Key> -root [winfo id .t]} -setup set x {} } -body { bind .t.f <Key> "lappend x %R" - event generate .t.f <Key> -root [winfo id .t] + event generate .t.f <Key> -root [winfo id .t] expr {[winfo id .t] eq $x} } -cleanup { destroy .t.f @@ -3555,7 +3555,7 @@ test bind-22.67 {HandleEventGenerate: options <Button> -root .t} -setup { set x {} } -body { bind .t.f <Button> "lappend x %R" - event generate .t.f <Button> -root .t + event generate .t.f <Button> -root .t expr {[winfo id .t] eq $x} } -cleanup { destroy .t.f @@ -3569,7 +3569,7 @@ test bind-22.68 {HandleEventGenerate: options <ButtonRelease> -root .t} -setup { set x {} } -body { bind .t.f <ButtonRelease> "lappend x %R" - event generate .t.f <ButtonRelease> -root .t + event generate .t.f <ButtonRelease> -root .t expr {[winfo id .t] eq $x} } -cleanup { destroy .t.f @@ -3583,7 +3583,7 @@ test bind-22.69 {HandleEventGenerate: options <Motion> -root .t} -setup { set x {} } -body { bind .t.f <Motion> "lappend x %R" - event generate .t.f <Motion> -root .t + event generate .t.f <Motion> -root .t expr {[winfo id .t] eq $x} } -cleanup { destroy .t.f @@ -3597,7 +3597,7 @@ test bind-22.70 {HandleEventGenerate: options <<Paste>> -root .t} -setup { set x {} } -body { bind .t.f <<Paste>> "lappend x %R" - event generate .t.f <<Paste>> -root .t + event generate .t.f <<Paste>> -root .t expr {[winfo id .t] eq $x} } -cleanup { destroy .t.f @@ -3611,7 +3611,7 @@ test bind-22.71 {HandleEventGenerate: options <Enter> -root .t} -setup { set x {} } -body { bind .t.f <Enter> "lappend x %R" - event generate .t.f <Enter> -root .t + event generate .t.f <Enter> -root .t expr {[winfo id .t] eq $x} } -cleanup { destroy .t.f @@ -3625,7 +3625,7 @@ test bind-22.72 {HandleEventGenerate: options <Configure> -root .t} -setup { set x {} } -body { bind .t.f <Configure> "lappend x %R" - event generate .t.f <Configure> -root .t + event generate .t.f <Configure> -root .t } -cleanup { destroy .t.f } -returnCodes error -result {<Configure> event doesn't accept "-root" option} @@ -3638,7 +3638,7 @@ test bind-22.73 {HandleEventGenerate: options <Key> -rootx xyz} -setup { set x {} } -body { bind .t.f <Key> "lappend x %X" - event generate .t.f <Key> -rootx xyz + event generate .t.f <Key> -rootx xyz } -cleanup { destroy .t.f } -returnCodes error -result {bad screen distance "xyz"} @@ -3651,7 +3651,7 @@ test bind-22.74 {HandleEventGenerate: options <Key> -rootx 2i} -setup { set x {} } -body { bind .t.f <Key> "lappend x %X" - event generate .t.f <Key> -rootx 2i + event generate .t.f <Key> -rootx 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -3665,7 +3665,7 @@ test bind-22.75 {HandleEventGenerate: options <Button> -rootx 2i} -setup { set x {} } -body { bind .t.f <Button> "lappend x %X" - event generate .t.f <Button> -rootx 2i + event generate .t.f <Button> -rootx 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -3679,7 +3679,7 @@ test bind-22.76 {HandleEventGenerate: options <ButtonRelease> -rootx 2i} -setup set x {} } -body { bind .t.f <ButtonRelease> "lappend x %X" - event generate .t.f <ButtonRelease> -rootx 2i + event generate .t.f <ButtonRelease> -rootx 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -3693,7 +3693,7 @@ test bind-22.77 {HandleEventGenerate: options <Motion> -rootx 2i} -setup { set x {} } -body { bind .t.f <Motion> "lappend x %X" - event generate .t.f <Motion> -rootx 2i + event generate .t.f <Motion> -rootx 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -3707,7 +3707,7 @@ test bind-22.78 {HandleEventGenerate: options <<Paste>> -rootx 2i} -setup { set x {} } -body { bind .t.f <<Paste>> "lappend x %X" - event generate .t.f <<Paste>> -rootx 2i + event generate .t.f <<Paste>> -rootx 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -3721,7 +3721,7 @@ test bind-22.79 {HandleEventGenerate: options <Enter> -rootx 2i} -setup { set x {} } -body { bind .t.f <Enter> "lappend x %X" - event generate .t.f <Enter> -rootx 2i + event generate .t.f <Enter> -rootx 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -3735,7 +3735,7 @@ test bind-22.80 {HandleEventGenerate: options <Configure> -rootx 2i} -setup { set x {} } -body { bind .t.f <Configure> "lappend x %X" - event generate .t.f <Configure> -rootx 2i + event generate .t.f <Configure> -rootx 2i } -cleanup { destroy .t.f } -returnCodes error -result {<Configure> event doesn't accept "-rootx" option} @@ -3748,7 +3748,7 @@ test bind-22.81 {HandleEventGenerate: options <Key> -rooty xyz} -setup { set x {} } -body { bind .t.f <Key> "lappend x %Y" - event generate .t.f <Key> -rooty xyz + event generate .t.f <Key> -rooty xyz } -cleanup { destroy .t.f } -returnCodes error -result {bad screen distance "xyz"} @@ -3761,7 +3761,7 @@ test bind-22.82 {HandleEventGenerate: options <Key> -rooty 2i} -setup { set x {} } -body { bind .t.f <Key> "lappend x %Y" - event generate .t.f <Key> -rooty 2i + event generate .t.f <Key> -rooty 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -3775,7 +3775,7 @@ test bind-22.83 {HandleEventGenerate: options <Button> -rooty 2i} -setup { set x {} } -body { bind .t.f <Button> "lappend x %Y" - event generate .t.f <Button> -rooty 2i + event generate .t.f <Button> -rooty 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -3789,7 +3789,7 @@ test bind-22.84 {HandleEventGenerate: options <ButtonRelease> -rooty 2i} -setup set x {} } -body { bind .t.f <ButtonRelease> "lappend x %Y" - event generate .t.f <ButtonRelease> -rooty 2i + event generate .t.f <ButtonRelease> -rooty 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -3803,7 +3803,7 @@ test bind-22.85 {HandleEventGenerate: options <Motion> -rooty 2i} -setup { set x {} } -body { bind .t.f <Motion> "lappend x %Y" - event generate .t.f <Motion> -rooty 2i + event generate .t.f <Motion> -rooty 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -3817,7 +3817,7 @@ test bind-22.86 {HandleEventGenerate: options <<Paste>> -rooty 2i} -setup { set x {} } -body { bind .t.f <<Paste>> "lappend x %Y" - event generate .t.f <<Paste>> -rooty 2i + event generate .t.f <<Paste>> -rooty 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -3831,7 +3831,7 @@ test bind-22.87 {HandleEventGenerate: options <Enter> -rooty 2i} -setup { set x {} } -body { bind .t.f <Enter> "lappend x %Y" - event generate .t.f <Enter> -rooty 2i + event generate .t.f <Enter> -rooty 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -3845,7 +3845,7 @@ test bind-22.88 {HandleEventGenerate: options <Configure> -rooty 2i} -setup { set x {} } -body { bind .t.f <Configure> "lappend x %Y" - event generate .t.f <Configure> -rooty 2i + event generate .t.f <Configure> -rooty 2i } -cleanup { destroy .t.f } -returnCodes error -result {<Configure> event doesn't accept "-rooty" option} @@ -3858,7 +3858,7 @@ test bind-22.89 {HandleEventGenerate: options <Key> -sendevent xyz} -setup { set x {} } -body { bind .t.f <Key> "lappend x %E" - event generate .t.f <Key> -sendevent xyz + event generate .t.f <Key> -sendevent xyz } -cleanup { destroy .t.f } -returnCodes error -result {expected boolean value but got "xyz"} @@ -3871,7 +3871,7 @@ test bind-22.90 {HandleEventGenerate: options <Key> -sendevent 1} -setup { set x {} } -body { bind .t.f <Key> "lappend x %E" - event generate .t.f <Key> -sendevent 1 + event generate .t.f <Key> -sendevent 1 return $x } -cleanup { destroy .t.f @@ -3885,7 +3885,7 @@ test bind-22.91 {HandleEventGenerate: options <Key> -sendevent yes} -setup { set x {} } -body { bind .t.f <Key> "lappend x %E" - event generate .t.f <Key> -sendevent yes + event generate .t.f <Key> -sendevent yes return $x } -cleanup { destroy .t.f @@ -3899,7 +3899,7 @@ test bind-22.92 {HandleEventGenerate: options <Key> -sendevent 43} -setup { set x {} } -body { bind .t.f <Key> "lappend x %E" - event generate .t.f <Key> -sendevent 43 + event generate .t.f <Key> -sendevent 43 return $x } -cleanup { destroy .t.f @@ -3913,7 +3913,7 @@ test bind-22.93 {HandleEventGenerate: options <Key> -serial xyz} -setup { set x {} } -body { bind .t.f <Key> "lappend x %#" - event generate .t.f <Key> -serial xyz + event generate .t.f <Key> -serial xyz } -cleanup { destroy .t.f } -returnCodes error -result {expected integer but got "xyz"} @@ -3926,7 +3926,7 @@ test bind-22.94 {HandleEventGenerate: options <Key> -serial 100} -setup { set x {} } -body { bind .t.f <Key> "lappend x %#" - event generate .t.f <Key> -serial 100 + event generate .t.f <Key> -serial 100 return $x } -cleanup { destroy .t.f @@ -3940,7 +3940,7 @@ test bind-22.95 {HandleEventGenerate: options <Key> -state xyz} -setup { set x {} } -body { bind .t.f <Key> "lappend x %s" - event generate .t.f <Key> -state xyz + event generate .t.f <Key> -state xyz } -cleanup { destroy .t.f } -returnCodes error -result {expected integer but got "xyz"} @@ -3953,7 +3953,7 @@ test bind-22.96 {HandleEventGenerate: options <Key> -state 1} -setup { set x {} } -body { bind .t.f <Key> "lappend x %s" - event generate .t.f <Key> -state 1 + event generate .t.f <Key> -state 1 return $x } -cleanup { destroy .t.f @@ -3967,7 +3967,7 @@ test bind-22.97 {HandleEventGenerate: options <Button> -state 1025} -setup { set x {} } -body { bind .t.f <Button> "lappend x %s" - event generate .t.f <Button> -state 1025 + event generate .t.f <Button> -state 1025 return $x } -cleanup { destroy .t.f @@ -3981,7 +3981,7 @@ test bind-22.98 {HandleEventGenerate: options <ButtonRelease> -state 1025} -setu set x {} } -body { bind .t.f <ButtonRelease> "lappend x %s" - event generate .t.f <ButtonRelease> -state 1025 + event generate .t.f <ButtonRelease> -state 1025 return $x } -cleanup { destroy .t.f @@ -3995,7 +3995,7 @@ test bind-22.99 {HandleEventGenerate: options <Motion> -state 1} -setup { set x {} } -body { bind .t.f <Motion> "lappend x %s" - event generate .t.f <Motion> -state 1 + event generate .t.f <Motion> -state 1 return $x } -cleanup { destroy .t.f @@ -4009,7 +4009,7 @@ test bind-22.100 {HandleEventGenerate: options <<Paste>> -state 1} -setup { set x {} } -body { bind .t.f <<Paste>> "lappend x %s" - event generate .t.f <<Paste>> -state 1 + event generate .t.f <<Paste>> -state 1 return $x } -cleanup { destroy .t.f @@ -4023,7 +4023,7 @@ test bind-22.101 {HandleEventGenerate: options <Enter> -state 1} -setup { set x {} } -body { bind .t.f <Enter> "lappend x %s" - event generate .t.f <Enter> -state 1 + event generate .t.f <Enter> -state 1 return $x } -cleanup { destroy .t.f @@ -4037,7 +4037,7 @@ test bind-22.102 {HandleEventGenerate: options <Visibility> -state xyz} -setup { set x {} } -body { bind .t.f <Visibility> "lappend x %s" - event generate .t.f <Visibility> -state xyz + event generate .t.f <Visibility> -state xyz } -cleanup { destroy .t.f } -returnCodes error -result {bad -state value "xyz": must be VisibilityUnobscured, VisibilityPartiallyObscured, or VisibilityFullyObscured} @@ -4050,7 +4050,7 @@ test bind-22.103 {HandleEventGenerate: options <Visibility> -state VisibilityUno set x {} } -body { bind .t.f <Visibility> "lappend x %s" - event generate .t.f <Visibility> -state VisibilityUnobscured + event generate .t.f <Visibility> -state VisibilityUnobscured return $x } -cleanup { destroy .t.f @@ -4064,7 +4064,7 @@ test bind-22.104 {HandleEventGenerate: options <Configure> -state xyz} -setup { set x {} } -body { bind .t.f <Configure> "lappend x %s" - event generate .t.f <Configure> -state xyz + event generate .t.f <Configure> -state xyz } -cleanup { destroy .t.f } -returnCodes error -result {<Configure> event doesn't accept "-state" option} @@ -4077,7 +4077,7 @@ test bind-22.105 {HandleEventGenerate: options <Key> -subwindow .xyz} -setup { set x {} } -body { bind .t.f <Key> "lappend x %S" - event generate .t.f <Key> -subwindow .xyz + event generate .t.f <Key> -subwindow .xyz } -cleanup { destroy .t.f } -returnCodes error -result {bad window path name ".xyz"} @@ -4090,7 +4090,7 @@ test bind-22.106 {HandleEventGenerate: options <Key> -subwindow .t} -setup { set x {} } -body { bind .t.f <Key> "lappend x %S" - event generate .t.f <Key> -subwindow .t + event generate .t.f <Key> -subwindow .t expr {[winfo id .t] eq $x} } -cleanup { destroy .t.f @@ -4104,7 +4104,7 @@ test bind-22.107 {HandleEventGenerate: options <Key> -subwindow xyz} -setup { set x {} } -body { bind .t.f <Key> "lappend x %S" - event generate .t.f <Key> -subwindow xyz + event generate .t.f <Key> -subwindow xyz } -cleanup { destroy .t.f } -returnCodes error -result {bad window name/identifier "xyz"} @@ -4117,7 +4117,7 @@ test bind-22.108 {HandleEventGenerate: options <Key> -subwindow [winfo id .t]} - set x {} } -body { bind .t.f <Key> "lappend x %S" - event generate .t.f <Key> -subwindow [winfo id .t] + event generate .t.f <Key> -subwindow [winfo id .t] expr {[winfo id .t] eq $x} } -cleanup { destroy .t.f @@ -4131,7 +4131,7 @@ test bind-22.109 {HandleEventGenerate: options <Button> -subwindow .t} -setup { set x {} } -body { bind .t.f <Button> "lappend x %S" - event generate .t.f <Button> -subwindow .t + event generate .t.f <Button> -subwindow .t expr {[winfo id .t] eq $x} } -cleanup { destroy .t.f @@ -4145,7 +4145,7 @@ test bind-22.110 {HandleEventGenerate: options <ButtonRelease> -subwindow .t} -s set x {} } -body { bind .t.f <ButtonRelease> "lappend x %S" - event generate .t.f <ButtonRelease> -subwindow .t + event generate .t.f <ButtonRelease> -subwindow .t expr {[winfo id .t] eq $x} } -cleanup { destroy .t.f @@ -4159,7 +4159,7 @@ test bind-22.111 {HandleEventGenerate: options <Motion> -subwindow .t} -setup { set x {} } -body { bind .t.f <Motion> "lappend x %S" - event generate .t.f <Motion> -subwindow .t + event generate .t.f <Motion> -subwindow .t expr {[winfo id .t] eq $x} } -cleanup { destroy .t.f @@ -4173,7 +4173,7 @@ test bind-22.112 {HandleEventGenerate: options <<Paste>> -subwindow .t} -setup { set x {} } -body { bind .t.f <<Paste>> "lappend x %S" - event generate .t.f <<Paste>> -subwindow .t + event generate .t.f <<Paste>> -subwindow .t expr {[winfo id .t] eq $x} } -cleanup { destroy .t.f @@ -4187,7 +4187,7 @@ test bind-22.113 {HandleEventGenerate: options <Enter> -subwindow .t} -setup { set x {} } -body { bind .t.f <Enter> "lappend x %S" - event generate .t.f <Enter> -subwindow .t + event generate .t.f <Enter> -subwindow .t expr {[winfo id .t] eq $x} } -cleanup { destroy .t.f @@ -4201,7 +4201,7 @@ test bind-22.114 {HandleEventGenerate: options <Configure> -subwindow .t} -setup set x {} } -body { bind .t.f <Configure> "lappend x %S" - event generate .t.f <Configure> -subwindow .t + event generate .t.f <Configure> -subwindow .t } -cleanup { destroy .t.f } -returnCodes error -result {<Configure> event doesn't accept "-subwindow" option} @@ -4214,7 +4214,7 @@ test bind-22.115 {HandleEventGenerate: options <Key> -time xyz} -setup { set x {} } -body { bind .t.f <Key> "lappend x %t" - event generate .t.f <Key> -time xyz + event generate .t.f <Key> -time xyz } -cleanup { destroy .t.f } -returnCodes error -result {expected integer but got "xyz"} @@ -4227,7 +4227,7 @@ test bind-22.116 {HandleEventGenerate: options <Key> -time 100} -setup { set x {} } -body { bind .t.f <Key> "lappend x %t" - event generate .t.f <Key> -time 100 + event generate .t.f <Key> -time 100 return $x } -cleanup { destroy .t.f @@ -4241,7 +4241,7 @@ test bind-22.117 {HandleEventGenerate: options <Button> -time 100} -setup { set x {} } -body { bind .t.f <Button> "lappend x %t" - event generate .t.f <Button> -time 100 + event generate .t.f <Button> -time 100 return $x } -cleanup { destroy .t.f @@ -4255,7 +4255,7 @@ test bind-22.118 {HandleEventGenerate: options <ButtonRelease> -time 100} -setup set x {} } -body { bind .t.f <ButtonRelease> "lappend x %t" - event generate .t.f <ButtonRelease> -time 100 + event generate .t.f <ButtonRelease> -time 100 return $x } -cleanup { destroy .t.f @@ -4269,7 +4269,7 @@ test bind-22.119 {HandleEventGenerate: options <Motion> -time 100} -setup { set x {} } -body { bind .t.f <Motion> "lappend x %t" - event generate .t.f <Motion> -time 100 + event generate .t.f <Motion> -time 100 return $x } -cleanup { destroy .t.f @@ -4283,7 +4283,7 @@ test bind-22.120 {HandleEventGenerate: options <<Paste>> -time 100} -setup { set x {} } -body { bind .t.f <<Paste>> "lappend x %t" - event generate .t.f <<Paste>> -time 100 + event generate .t.f <<Paste>> -time 100 return $x } -cleanup { destroy .t.f @@ -4297,7 +4297,7 @@ test bind-22.121 {HandleEventGenerate: options <Enter> -time 100} -setup { set x {} } -body { bind .t.f <Enter> "lappend x %t" - event generate .t.f <Enter> -time 100 + event generate .t.f <Enter> -time 100 return $x } -cleanup { destroy .t.f @@ -4311,7 +4311,7 @@ test bind-22.122 {HandleEventGenerate: options <Property> -time 100} -setup { set x {} } -body { bind .t.f <Property> "lappend x %t" - event generate .t.f <Property> -time 100 + event generate .t.f <Property> -time 100 return $x } -cleanup { destroy .t.f @@ -4325,7 +4325,7 @@ test bind-22.123 {HandleEventGenerate: options <Configure> -time 100} -setup { set x {} } -body { bind .t.f <Configure> "lappend x %t" - event generate .t.f <Configure> -time 100 + event generate .t.f <Configure> -time 100 } -cleanup { destroy .t.f } -returnCodes error -result {<Configure> event doesn't accept "-time" option} @@ -4338,7 +4338,7 @@ test bind-22.124 {HandleEventGenerate: options <Expose> -width xyz} -setup { set x {} } -body { bind .t.f <Expose> "lappend x %w" - event generate .t.f <Expose> -width xyz + event generate .t.f <Expose> -width xyz } -cleanup { destroy .t.f } -returnCodes error -result {bad screen distance "xyz"} @@ -4351,7 +4351,7 @@ test bind-22.125 {HandleEventGenerate: options <Expose> -width 2i} -setup { set x {} } -body { bind .t.f <Expose> "lappend x %w" - event generate .t.f <Expose> -width 2i + event generate .t.f <Expose> -width 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -4365,7 +4365,7 @@ test bind-22.126 {HandleEventGenerate: options <Configure> -width 2i} -setup { set x {} } -body { bind .t.f <Configure> "lappend x %w" - event generate .t.f <Configure> -width 2i + event generate .t.f <Configure> -width 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -4379,7 +4379,7 @@ test bind-22.127 {HandleEventGenerate: options <Key> -width 2i} -setup { set x {} } -body { bind .t.f <Key> "lappend x %k" - event generate .t.f <Key> -width 2i + event generate .t.f <Key> -width 2i } -cleanup { destroy .t.f } -returnCodes error -result {<Key> event doesn't accept "-width" option} @@ -4392,7 +4392,7 @@ test bind-22.128 {HandleEventGenerate: options <Unmap> -window .xyz} -setup { set x {} } -body { bind .t.f <Unmap> "lappend x %W" - event generate .t.f <Unmap> -window .xyz + event generate .t.f <Unmap> -window .xyz } -cleanup { destroy .t.f } -returnCodes error -result {bad window path name ".xyz"} @@ -4405,7 +4405,7 @@ test bind-22.129 {HandleEventGenerate: options <Unmap> -window .t.f} -setup { set x {} } -body { bind .t.f <Unmap> "lappend x %W" - event generate .t.f <Unmap> -window .t.f + event generate .t.f <Unmap> -window .t.f return $x } -cleanup { destroy .t.f @@ -4419,7 +4419,7 @@ test bind-22.130 {HandleEventGenerate: options <Unmap> -window xyz} -setup { set x {} } -body { bind .t.f <Unmap> "lappend x %W" - event generate .t.f <Unmap> -window xyz + event generate .t.f <Unmap> -window xyz } -cleanup { destroy .t.f } -returnCodes error -result {bad window name/identifier "xyz"} @@ -4432,7 +4432,7 @@ test bind-22.131 {HandleEventGenerate: options <Unmap> -window [winfo id .t.f]} set x {} } -body { bind .t.f <Unmap> "lappend x %W" - event generate .t.f <Unmap> -window [winfo id .t.f] + event generate .t.f <Unmap> -window [winfo id .t.f] return $x } -cleanup { destroy .t.f @@ -4446,7 +4446,7 @@ test bind-22.132 {HandleEventGenerate: options <Unmap> -window .t.f} -setup { set x {} } -body { bind .t.f <Unmap> "lappend x %W" - event generate .t.f <Unmap> -window .t.f + event generate .t.f <Unmap> -window .t.f return $x } -cleanup { destroy .t.f @@ -4460,7 +4460,7 @@ test bind-22.133 {HandleEventGenerate: options <Map> -window .t.f} -setup { set x {} } -body { bind .t.f <Map> "lappend x %W" - event generate .t.f <Map> -window .t.f + event generate .t.f <Map> -window .t.f return $x } -cleanup { destroy .t.f @@ -4474,7 +4474,7 @@ test bind-22.134 {HandleEventGenerate: options <Reparent> -window .t.f} -setup { set x {} } -body { bind .t.f <Reparent> "lappend x %W" - event generate .t.f <Reparent> -window .t.f + event generate .t.f <Reparent> -window .t.f return $x } -cleanup { destroy .t.f @@ -4488,7 +4488,7 @@ test bind-22.135 {HandleEventGenerate: options <Configure> -window .t.f} -setup set x {} } -body { bind .t.f <Configure> "lappend x %W" - event generate .t.f <Configure> -window .t.f + event generate .t.f <Configure> -window .t.f return $x } -cleanup { destroy .t.f @@ -4502,7 +4502,7 @@ test bind-22.136 {HandleEventGenerate: options <Gravity> -window .t.f} -setup { set x {} } -body { bind .t.f <Gravity> "lappend x %W" - event generate .t.f <Gravity> -window .t.f + event generate .t.f <Gravity> -window .t.f return $x } -cleanup { destroy .t.f @@ -4516,7 +4516,7 @@ test bind-22.137 {HandleEventGenerate: options <Circulate> -window .t.f} -setup set x {} } -body { bind .t.f <Circulate> "lappend x %W" - event generate .t.f <Circulate> -window .t.f + event generate .t.f <Circulate> -window .t.f return $x } -cleanup { destroy .t.f @@ -4530,7 +4530,7 @@ test bind-22.138 {HandleEventGenerate: options <Key> -window .t.f} -setup { set x {} } -body { bind .t.f <Key> "lappend x %W" - event generate .t.f <Key> -window .t.f + event generate .t.f <Key> -window .t.f } -cleanup { destroy .t.f } -returnCodes error -result {<Key> event doesn't accept "-window" option} @@ -4543,7 +4543,7 @@ test bind-22.139 {HandleEventGenerate: options <Key> -x xyz} -setup { set x {} } -body { bind .t.f <Key> "lappend x %x" - event generate .t.f <Key> -x xyz + event generate .t.f <Key> -x xyz } -cleanup { destroy .t.f } -returnCodes error -result {bad screen distance "xyz"} @@ -4556,7 +4556,7 @@ test bind-22.140 {HandleEventGenerate: options <Key> -x 2i} -setup { set x {} } -body { bind .t.f <Key> "lappend x %x" - event generate .t.f <Key> -x 2i + event generate .t.f <Key> -x 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -4570,7 +4570,7 @@ test bind-22.141 {HandleEventGenerate: options <Button> -x 2i} -setup { set x {} } -body { bind .t.f <Button> "lappend x %x" - event generate .t.f <Button> -x 2i + event generate .t.f <Button> -x 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -4584,7 +4584,7 @@ test bind-22.142 {HandleEventGenerate: options <ButtonRelease> -x 2i} -setup { set x {} } -body { bind .t.f <ButtonRelease> "lappend x %x" - event generate .t.f <ButtonRelease> -x 2i + event generate .t.f <ButtonRelease> -x 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -4598,7 +4598,7 @@ test bind-22.143 {HandleEventGenerate: options <Motion> -x 2i} -setup { set x {} } -body { bind .t.f <Motion> "lappend x %x" - event generate .t.f <Motion> -x 2i + event generate .t.f <Motion> -x 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -4612,7 +4612,7 @@ test bind-22.144 {HandleEventGenerate: options <<Paste>> -x 2i} -setup { set x {} } -body { bind .t.f <<Paste>> "lappend x %x" - event generate .t.f <<Paste>> -x 2i + event generate .t.f <<Paste>> -x 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -4626,7 +4626,7 @@ test bind-22.145 {HandleEventGenerate: options <Enter> -x 2i} -setup { set x {} } -body { bind .t.f <Enter> "lappend x %x" - event generate .t.f <Enter> -x 2i + event generate .t.f <Enter> -x 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -4640,7 +4640,7 @@ test bind-22.146 {HandleEventGenerate: options <Expose> -x 2i} -setup { set x {} } -body { bind .t.f <Expose> "lappend x %x" - event generate .t.f <Expose> -x 2i + event generate .t.f <Expose> -x 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -4654,7 +4654,7 @@ test bind-22.147 {HandleEventGenerate: options <Configure> -x 2i} -setup { set x {} } -body { bind .t.f <Configure> "lappend x %x" - event generate .t.f <Configure> -x 2i + event generate .t.f <Configure> -x 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -4668,7 +4668,7 @@ test bind-22.148 {HandleEventGenerate: options <Gravity> -x 2i} -setup { set x {} } -body { bind .t.f <Gravity> "lappend x %x" - event generate .t.f <Gravity> -x 2i + event generate .t.f <Gravity> -x 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -4682,7 +4682,7 @@ test bind-22.149 {HandleEventGenerate: options <Reparent> -x 2i} -setup { set x {} } -body { bind .t.f <Reparent> "lappend x %x" - event generate .t.f <Reparent> -x 2i + event generate .t.f <Reparent> -x 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -4696,7 +4696,7 @@ test bind-22.150 {HandleEventGenerate: options <Map> -x 2i} -setup { set x {} } -body { bind .t.f <Map> "lappend x %x" - event generate .t.f <Map> -x 2i + event generate .t.f <Map> -x 2i } -cleanup { destroy .t.f } -returnCodes error -result {<Map> event doesn't accept "-x" option} @@ -4709,7 +4709,7 @@ test bind-22.151 {HandleEventGenerate: options <Key> -y xyz} -setup { set x {} } -body { bind .t.f <Key> "lappend x %y" - event generate .t.f <Key> -y xyz + event generate .t.f <Key> -y xyz } -cleanup { destroy .t.f } -returnCodes error -result {bad screen distance "xyz"} @@ -4722,7 +4722,7 @@ test bind-22.152 {HandleEventGenerate: options <Key> -y 2i} -setup { set x {} } -body { bind .t.f <Key> "lappend x %y" - event generate .t.f <Key> -y 2i + event generate .t.f <Key> -y 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -4736,7 +4736,7 @@ test bind-22.153 {HandleEventGenerate: options <Button> -y 2i} -setup { set x {} } -body { bind .t.f <Button> "lappend x %y" - event generate .t.f <Button> -y 2i + event generate .t.f <Button> -y 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -4750,7 +4750,7 @@ test bind-22.154 {HandleEventGenerate: options <ButtonRelease> -y 2i} -setup { set x {} } -body { bind .t.f <ButtonRelease> "lappend x %y" - event generate .t.f <ButtonRelease> -y 2i + event generate .t.f <ButtonRelease> -y 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -4764,7 +4764,7 @@ test bind-22.155 {HandleEventGenerate: options <Motion> -y 2i} -setup { set x {} } -body { bind .t.f <Motion> "lappend x %y" - event generate .t.f <Motion> -y 2i + event generate .t.f <Motion> -y 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -4778,7 +4778,7 @@ test bind-22.156 {HandleEventGenerate: options <<Paste>> -y 2i} -setup { set x {} } -body { bind .t.f <<Paste>> "lappend x %y" - event generate .t.f <<Paste>> -y 2i + event generate .t.f <<Paste>> -y 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -4792,7 +4792,7 @@ test bind-22.157 {HandleEventGenerate: options <Enter> -y 2i} -setup { set x {} } -body { bind .t.f <Enter> "lappend x %y" - event generate .t.f <Enter> -y 2i + event generate .t.f <Enter> -y 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -4806,7 +4806,7 @@ test bind-22.158 {HandleEventGenerate: options <Expose> -y 2i} -setup { set x {} } -body { bind .t.f <Expose> "lappend x %y" - event generate .t.f <Expose> -y 2i + event generate .t.f <Expose> -y 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -4820,7 +4820,7 @@ test bind-22.159 {HandleEventGenerate: options <Configure> -y 2i} -setup { set x {} } -body { bind .t.f <Configure> "lappend x %y" - event generate .t.f <Configure> -y 2i + event generate .t.f <Configure> -y 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -4834,7 +4834,7 @@ test bind-22.160 {HandleEventGenerate: options <Gravity> -y 2i} -setup { set x {} } -body { bind .t.f <Gravity> "lappend x %y" - event generate .t.f <Gravity> -y 2i + event generate .t.f <Gravity> -y 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -4848,7 +4848,7 @@ test bind-22.161 {HandleEventGenerate: options <Reparent> -y 2i} -setup { set x {} } -body { bind .t.f <Reparent> "lappend x %y" - event generate .t.f <Reparent> -y 2i + event generate .t.f <Reparent> -y 2i expr {[winfo pixels .t.f 2i] eq $x} } -cleanup { destroy .t.f @@ -4862,7 +4862,7 @@ test bind-22.162 {HandleEventGenerate: options <Map> -y 2i} -setup { set x {} } -body { bind .t.f <Map> "lappend x %y" - event generate .t.f <Map> -y 2i + event generate .t.f <Map> -y 2i } -cleanup { destroy .t.f } -returnCodes error -result {<Map> event doesn't accept "-y" option} @@ -4875,7 +4875,7 @@ test bind-22.163 {HandleEventGenerate: options <Key> -xyz 1} -setup { set x {} } -body { bind .t.f <Key> "lappend x %k" - event generate .t.f <Key> -xyz 1 + event generate .t.f <Key> -xyz 1 } -cleanup { destroy .t.f } -returnCodes error -result {bad option "-xyz": must be -when, -above, -borderwidth, -button, -count, -data, -delta, -detail, -focus, -height, -keycode, -keysym, -mode, -override, -place, -root, -rootx, -rooty, -sendevent, -serial, -state, -subwindow, -time, -warp, -width, -window, -x, or -y} @@ -5765,8 +5765,8 @@ test bind-27.1 {button names} -body { bind .t <Expose-1> foo } -returnCodes error -result {specified button "1" for non-button event} test bind-27.2 {button names} -body { - bind .t <Button-10> foo -} -returnCodes error -result {bad event type or keysym "10"} + bind .t <Button-6> foo +} -returnCodes error -result {specified keysym "6" for non-key event} test bind-27.3 {button names} -setup { frame .t.f -class Test -width 150 -height 100 pack .t.f @@ -5837,62 +5837,6 @@ test bind-27.7 {button names} -setup { } -cleanup { destroy .t.f } -result {<Button-5> {button 5}} -test bind-27.8 {button names} -setup { - frame .t.f -class Test -width 150 -height 100 - pack .t.f - focus -force .t.f - update -} -body { - bind .t.f <Button-6> {lappend x "button 6"} - set x [bind .t.f] - event generate .t.f <Button-6> - event generate .t.f <ButtonRelease-6> - set x -} -cleanup { - destroy .t.f -} -result {<Button-6> {button 6}} -test bind-27.9 {button names} -setup { - frame .t.f -class Test -width 150 -height 100 - pack .t.f - focus -force .t.f - update -} -body { - bind .t.f <Button-7> {lappend x "button 7"} - set x [bind .t.f] - event generate .t.f <Button-7> - event generate .t.f <ButtonRelease-7> - set x -} -cleanup { - destroy .t.f -} -result {<Button-7> {button 7}} -test bind-27.10 {button names} -setup { - frame .t.f -class Test -width 150 -height 100 - pack .t.f - focus -force .t.f - update -} -body { - bind .t.f <Button-8> {lappend x "button 8"} - set x [bind .t.f] - event generate .t.f <Button-8> - event generate .t.f <ButtonRelease-8> - set x -} -cleanup { - destroy .t.f -} -result {<Button-8> {button 8}} -test bind-27.11 {button names} -setup { - frame .t.f -class Test -width 150 -height 100 - pack .t.f - focus -force .t.f - update -} -body { - bind .t.f <Button-9> {lappend x "button 9"} - set x [bind .t.f] - event generate .t.f <Button-9> - event generate .t.f <ButtonRelease-9> - set x -} -cleanup { - destroy .t.f -} -result {<Button-9> {button 9}} test bind-28.1 {keysym names} -body { bind .t <Expose-a> foo @@ -5992,7 +5936,7 @@ test bind-29.1 {Tk_BackgroundError procedure} -setup { while executing "error "This is a test"" (command bound to event)}} - + test bind-29.2 {Tk_BackgroundError procedure} -setup { proc do {} { event generate .t.f <Button> |