diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2000-11-23 13:50:10 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2000-11-23 13:50:10 (GMT) |
commit | 30949cbba8e868da7e1fa1e4200be6385bd07797 (patch) | |
tree | c925f625f3b1f913bfea06c7acffe3d7b8521474 /tests | |
parent | e8a9f7a1eb829433dc7432244df8f5d1d7798d13 (diff) | |
download | tk-30949cbba8e868da7e1fa1e4200be6385bd07797.zip tk-30949cbba8e868da7e1fa1e4200be6385bd07797.tar.gz tk-30949cbba8e868da7e1fa1e4200be6385bd07797.tar.bz2 |
Fixed bug #120819 by prohibiting images from starting with a period;
I'm still not quite sure what exactly was going wrong in the bug, but
I suspect the problem might have actually been due to the deletion of
all images while in the midst of creating an image. The restriction
is pretty light when it comes to existing code, since it previously
caused a core dump due to an image typePtr field being set to random
garbage, an indication of over-eager use of free()...
Diffstat (limited to 'tests')
-rw-r--r-- | tests/image.test | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/image.test b/tests/image.test index b2abc36..296eedf 100644 --- a/tests/image.test +++ b/tests/image.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: image.test,v 1.4 2000/05/15 18:21:47 ericm Exp $ +# RCS: @(#) $Id: image.test,v 1.5 2000/11/23 13:50:10 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -80,6 +80,9 @@ test image-1.9 {Tk_ImageCmd procedure, "create" option} { eval image delete [image names] list [catch {image create test -badName foo} msg] $msg [image names] } {1 {bad option name "-badName"} {}} +test image-1.10 {Tk_ImageCmd procedure, "create" option} { + list [catch {image create test .} msg] $msg +} {1 {image names cannot start with period symbols: "." is illegal}} test image-2.1 {Tk_ImageCmd procedure, "delete" option} { list [catch {image delete} msg] $msg |