summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 {