diff options
Diffstat (limited to 'tests/bind.test')
-rw-r--r-- | tests/bind.test | 372 |
1 files changed, 214 insertions, 158 deletions
diff --git a/tests/bind.test b/tests/bind.test index 474771d..0514499 100644 --- a/tests/bind.test +++ b/tests/bind.test @@ -69,10 +69,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 { @@ -133,10 +133,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} @@ -148,10 +148,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} @@ -191,7 +191,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 { @@ -211,9 +211,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 @@ -227,7 +227,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 { @@ -247,7 +247,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"} @@ -271,7 +271,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 @@ -375,7 +375,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 } @@ -384,7 +384,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 } @@ -393,7 +393,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 } @@ -427,7 +427,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> @@ -450,7 +450,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 { @@ -506,11 +506,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> {} @@ -591,10 +591,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 { @@ -608,10 +608,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 @@ -847,7 +847,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 @@ -1011,7 +1011,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 @@ -1200,7 +1200,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 @@ -1241,7 +1241,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 @@ -1258,7 +1258,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 @@ -1275,7 +1275,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 @@ -1292,7 +1292,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 @@ -1309,7 +1309,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 @@ -1326,7 +1326,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 @@ -1343,7 +1343,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 @@ -1360,7 +1360,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 @@ -2017,7 +2017,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 @@ -2242,7 +2242,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>} @@ -2335,7 +2335,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>> @@ -2344,7 +2344,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 { @@ -2415,13 +2415,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} @@ -2473,7 +2473,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> @@ -2540,7 +2540,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> @@ -2576,7 +2576,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> @@ -2648,7 +2648,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> @@ -3385,7 +3385,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"} @@ -3398,7 +3398,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 @@ -3412,7 +3412,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 @@ -3426,7 +3426,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 @@ -3440,7 +3440,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} @@ -3453,7 +3453,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} @@ -3466,7 +3466,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 @@ -3480,7 +3480,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} @@ -3493,7 +3493,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"} @@ -3506,7 +3506,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 @@ -3520,7 +3520,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"} @@ -3533,7 +3533,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 @@ -3547,7 +3547,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 @@ -3561,7 +3561,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 @@ -3575,7 +3575,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 @@ -3589,7 +3589,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 @@ -3603,7 +3603,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 @@ -3617,7 +3617,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} @@ -3630,7 +3630,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"} @@ -3643,7 +3643,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 @@ -3657,7 +3657,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 @@ -3671,7 +3671,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 @@ -3685,7 +3685,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 @@ -3699,7 +3699,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 @@ -3713,7 +3713,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 @@ -3727,7 +3727,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} @@ -3740,7 +3740,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"} @@ -3753,7 +3753,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 @@ -3767,7 +3767,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 @@ -3781,7 +3781,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 @@ -3795,7 +3795,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 @@ -3809,7 +3809,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 @@ -3823,7 +3823,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 @@ -3837,7 +3837,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} @@ -3850,7 +3850,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"} @@ -3863,7 +3863,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 @@ -3877,7 +3877,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 @@ -3891,7 +3891,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 @@ -3905,7 +3905,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"} @@ -3918,7 +3918,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 @@ -3932,7 +3932,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"} @@ -3945,7 +3945,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 @@ -3959,7 +3959,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 @@ -3973,7 +3973,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 @@ -3987,7 +3987,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 @@ -4001,7 +4001,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 @@ -4015,7 +4015,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 @@ -4029,7 +4029,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} @@ -4042,7 +4042,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 @@ -4056,7 +4056,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} @@ -4069,7 +4069,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"} @@ -4082,7 +4082,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 @@ -4096,7 +4096,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"} @@ -4109,7 +4109,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 @@ -4123,7 +4123,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 @@ -4137,7 +4137,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 @@ -4151,7 +4151,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 @@ -4165,7 +4165,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 @@ -4179,7 +4179,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 @@ -4193,7 +4193,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} @@ -4206,7 +4206,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"} @@ -4219,7 +4219,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 @@ -4233,7 +4233,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 @@ -4247,7 +4247,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 @@ -4261,7 +4261,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 @@ -4275,7 +4275,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 @@ -4289,7 +4289,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 @@ -4303,7 +4303,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 @@ -4317,7 +4317,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} @@ -4330,7 +4330,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"} @@ -4343,7 +4343,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 @@ -4357,7 +4357,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 @@ -4371,7 +4371,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} @@ -4384,7 +4384,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"} @@ -4397,7 +4397,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 @@ -4411,7 +4411,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"} @@ -4424,7 +4424,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 @@ -4438,7 +4438,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 @@ -4452,7 +4452,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 @@ -4466,7 +4466,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 @@ -4480,7 +4480,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 @@ -4494,7 +4494,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 @@ -4508,7 +4508,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 @@ -4522,7 +4522,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} @@ -4535,7 +4535,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"} @@ -4548,7 +4548,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 @@ -4562,7 +4562,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 @@ -4576,7 +4576,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 @@ -4590,7 +4590,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 @@ -4604,7 +4604,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 @@ -4618,7 +4618,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 @@ -4632,7 +4632,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 @@ -4646,7 +4646,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 @@ -4660,7 +4660,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 @@ -4674,7 +4674,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 @@ -4688,7 +4688,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} @@ -4701,7 +4701,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"} @@ -4714,7 +4714,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 @@ -4728,7 +4728,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 @@ -4742,7 +4742,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 @@ -4756,7 +4756,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 @@ -4770,7 +4770,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 @@ -4784,7 +4784,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 @@ -4798,7 +4798,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 @@ -4812,7 +4812,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 @@ -4826,7 +4826,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 @@ -4840,7 +4840,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 @@ -4854,7 +4854,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} @@ -4867,7 +4867,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} @@ -5757,8 +5757,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-6> foo -} -returnCodes error -result {specified keysym "6" for non-key event} + bind .t <Button-10> foo +} -returnCodes error -result {bad event type or keysym "10"} test bind-27.3 {button names} -setup { frame .t.f -class Test -width 150 -height 100 pack .t.f @@ -5829,6 +5829,62 @@ 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 @@ -5928,7 +5984,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> |