summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorpatthoyts@users.sourceforge.net <patthoyts>2007-10-09 12:34:33 (GMT)
committerpatthoyts@users.sourceforge.net <patthoyts>2007-10-09 12:34:33 (GMT)
commit16b13f6bfe25181d45731605cf2661892706250f (patch)
tree6d78ff59b95ba245009f2fa1cdd59e8ac38fcbea /tests
parent788cc776e0e316478ad07f5ee521b6a1bffd1de8 (diff)
downloadtk-16b13f6bfe25181d45731605cf2661892706250f.zip
tk-16b13f6bfe25181d45731605cf2661892706250f.tar.gz
tk-16b13f6bfe25181d45731605cf2661892706250f.tar.bz2
Make Ttk_GetImage safe if called with NULL interp. Added some tests
that crash on Windows without this fix.
Diffstat (limited to 'tests')
-rw-r--r--tests/ttk/image.test35
1 files changed, 34 insertions, 1 deletions
diff --git a/tests/ttk/image.test b/tests/ttk/image.test
index e9c1248..de2a65d 100644
--- a/tests/ttk/image.test
+++ b/tests/ttk/image.test
@@ -1,5 +1,5 @@
#
-# $Id: image.test,v 1.2 2006/12/09 20:53:35 jenglish Exp $
+# $Id: image.test,v 1.3 2007/10/09 12:34:34 patthoyts Exp $
#
package require Tk 8.5
@@ -17,5 +17,38 @@ test image-1.2 "Duplicate element" -setup {
ttk::style element create testElement image test.element
} -returnCodes 1 -result "Duplicate element testElement"
+test image-2.0 "Deletion of displayed image (label)" -setup {
+ image create photo test.image -width 10 -height 10
+} -body {
+ pack [set w [ttk::label .ttk_image20 -image test.image]]
+ tkwait visibility $w
+ image delete test.image
+ update
+} -cleanup {
+ destroy .ttk_image20
+} -result {}
+
+test image-2.1 "Deletion of displayed image (checkbutton)" -setup {
+ image create photo test.image -width 10 -height 10
+} -body {
+ pack [set w [ttk::checkbutton .ttk_image21 -image test.image]]
+ tkwait visibility $w
+ image delete test.image
+ update
+} -cleanup {
+ destroy .ttk_image21
+} -result {}
+
+test image-2.2 "Deletion of displayed image (radiobutton)" -setup {
+ image create photo test.image -width 10 -height 10
+} -body {
+ pack [set w [ttk::radiobutton .ttk_image22 -image test.image]]
+ tkwait visibility $w
+ image delete test.image
+ update
+} -cleanup {
+ destroy .ttk_image22
+} -result {}
+
#
tcltest::cleanupTests