summaryrefslogtreecommitdiffstats
path: root/tests/ttk
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2008-11-16 17:14:16 (GMT)
committerjenglish <jenglish@flightlab.com>2008-11-16 17:14:16 (GMT)
commitd9fafe1f52ff004f0ff69bd9c137f8ac0ffa1a85 (patch)
tree85462e1e5bc712fd9adae557c8182937658d0205 /tests/ttk
parentc06d8b5997ceab121a63b035b9cbe666d78bdbec (diff)
downloadtk-d9fafe1f52ff004f0ff69bd9c137f8ac0ffa1a85.zip
tk-d9fafe1f52ff004f0ff69bd9c137f8ac0ffa1a85.tar.gz
tk-d9fafe1f52ff004f0ff69bd9c137f8ac0ffa1a85.tar.bz2
Widget self-destruction is not necessarily an error [Bug 2298720].
Diffstat (limited to 'tests/ttk')
-rw-r--r--tests/ttk/ttk.test10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/ttk/ttk.test b/tests/ttk/ttk.test
index e050e2a..2bb3d04 100644
--- a/tests/ttk/ttk.test
+++ b/tests/ttk/ttk.test
@@ -23,7 +23,7 @@ test ttk-6.1 "Self-destructing checkbutton" -body {
trace variable sd w [list selfdestruct .sd]
update
.sd invoke
-} -returnCodes 1 -result "Widget has been destroyed"
+} -returnCodes 1
test ttk-6.2 "Checkbutton self-destructed" -body {
winfo exists .sd
} -result 0
@@ -118,6 +118,14 @@ test ttk-construction-failure-2 "Destroy widget in constructor" -setup {
;
} -result [list 1 "Widget has been destroyed" 0 {}]
+test ttk-selfdestruct-ok-1 "Intentional self-destruction" -body {
+ # see #2298720
+ toplevel .t
+ ttk::button .t.b -command [list destroy .t]
+ .t.b invoke
+ list [winfo exists .t] [winfo exists .t.b]
+} -result [list 0 0]
+
#
# Basic tests.
#