summaryrefslogtreecommitdiffstats
path: root/tests/bind.test
diff options
context:
space:
mode:
authorJoe Mistachkin <joe@mistachkin.com>2015-02-06 21:55:24 (GMT)
committerJoe Mistachkin <joe@mistachkin.com>2015-02-06 21:55:24 (GMT)
commit100c8158bd4887b6481076f77ddeb6dbf1167d9f (patch)
tree43a2d2c3aa3df0f9db7bde20a53b920916a8b6c5 /tests/bind.test
parent8c377d62f9d1f60c2e34088106dd97955b69badc (diff)
parent518e00a1dc2614aea4205513a4a3d32eb308ad72 (diff)
downloadtk-100c8158bd4887b6481076f77ddeb6dbf1167d9f.zip
tk-100c8158bd4887b6481076f77ddeb6dbf1167d9f.tar.gz
tk-100c8158bd4887b6481076f77ddeb6dbf1167d9f.tar.bz2
Modify bind tests for '%M' to save/restore the 'Key' bindings for both 'All' and 'Entry'. Fix for [6b13bf5ebf].
Diffstat (limited to 'tests/bind.test')
-rw-r--r--tests/bind.test30
1 files changed, 20 insertions, 10 deletions
diff --git a/tests/bind.test b/tests/bind.test
index 77f944c..474771d 100644
--- a/tests/bind.test
+++ b/tests/bind.test
@@ -2172,11 +2172,13 @@ test bind-16.44 {ExpandPercents procedure} -setup {
} -result {?? ??}
test bind-16.45 {ExpandPercents procedure} -setup {
- entry .t.e
- pack .t.e
- focus -force .t.e
- foreach p [event info] {event delete $p}
- update
+ set savedBind(Entry) [bind Entry <Key>]
+ set savedBind(All) [bind all <Key>]
+ entry .t.e
+ pack .t.e
+ focus -force .t.e
+ foreach p [event info] {event delete $p}
+ update
} -body {
bind .t.e <Key> {set x "%M"}
bind Entry <Key> {set y "%M"}
@@ -2186,13 +2188,18 @@ test bind-16.45 {ExpandPercents procedure} -setup {
list $x $y $z
} -cleanup {
destroy .t.e
+ bind all <Key> $savedBind(All)
+ bind Entry <Key> $savedBind(Entry)
+ unset savedBind
} -result {0 1 2}
test bind-16.46 {ExpandPercents procedure} -setup {
- entry .t.e
- pack .t.e
- focus -force .t.e
- foreach p [event info] {event delete $p}
- update
+ set savedBind(All) [bind all <Key>]
+ set savedBind(Entry) [bind Entry <Key>]
+ entry .t.e
+ pack .t.e
+ focus -force .t.e
+ foreach p [event info] {event delete $p}
+ update
} -body {
bind all <Key> {set z "%M"}
bind Entry <Key> {set y "%M"}
@@ -2202,6 +2209,9 @@ test bind-16.46 {ExpandPercents procedure} -setup {
list $x $y $z
} -cleanup {
destroy .t.e
+ bind Entry <Key> $savedBind(Entry)
+ bind all <Key> $savedBind(All)
+ unset savedBind
} -result {0 1 2}
test bind-17.1 {event command} -body {