summaryrefslogtreecommitdiffstats
path: root/tests/pack.test
diff options
context:
space:
mode:
authoroehhar <harald.oehlmann@elmicron.de>2018-10-29 12:52:40 (GMT)
committeroehhar <harald.oehlmann@elmicron.de>2018-10-29 12:52:40 (GMT)
commite2dd87abf18c856f4cda284db55b313e882e919f (patch)
tree0b6f33773db0f5a9b0a412de9d732c8936a4d280 /tests/pack.test
parent64095fae8d758cb1757a59e8a08f913a37796462 (diff)
downloadtk-e2dd87abf18c856f4cda284db55b313e882e919f.zip
tk-e2dd87abf18c856f4cda284db55b313e882e919f.tar.gz
tk-e2dd87abf18c856f4cda284db55b313e882e919f.tar.bz2
Tests for virtual event <<NoManagedChild>>
Diffstat (limited to 'tests/pack.test')
-rw-r--r--tests/pack.test58
1 files changed, 58 insertions, 0 deletions
diff --git a/tests/pack.test b/tests/pack.test
index 279db8b..061ea03 100644
--- a/tests/pack.test
+++ b/tests/pack.test
@@ -1626,6 +1626,64 @@ test pack-19.2 {test support for minreqsize} -setup {
destroy .pack.l .pack.lf
} -result {162x127+0+0 172x112+0+0}
+test pack-20.1 {<<NoManagedChild>> fires on last pack forget} -body {
+ global A
+ catch {unset A}
+ pack [frame .1]
+ update
+ bind . <<NoManagedChild>> {set A 1}
+ pack forget .1
+ update
+ info exists A
+} -cleanup {
+ bind . <<NoManagedChild>> {}
+ destroy .1
+} -result {1}
+
+test pack-20.2 {<Configure> does not fire on last pack forget} -body {
+ global A
+ catch {unset A}
+ pack [frame .1]
+ update
+ bind . <Configure> {set A 1}
+ pack forget .1
+ update
+ info exists A
+} -cleanup {
+ bind . <Configure> {}
+ destroy .1
+} -result {0}
+
+test pack-20.3 {<<NoManagedChild>> does not fire on forelast pack forget} -body {
+ global A
+ catch {unset A}
+ pack [frame .1]
+ pack [frame .2]
+ update
+ bind . <<NoManagedChild>> {set A 1}
+ pack forget .1
+ update
+ info exists A
+} -cleanup {
+ bind . <<NoManagedChild>> {}
+ destroy .1 .2
+} -result {0}
+
+test pack-20.4 {<Configure> does not fire on last pack forget} -body {
+ global A
+ catch {unset A}
+ pack [frame .1]
+ pack [frame .2]
+ update
+ bind . <Configure> {set A 1}
+ pack forget .1
+ update
+ info exists A
+} -cleanup {
+ bind . <Configure> {}
+ destroy .1 .2
+} -result {1}
+
# cleanup
cleanupTests