diff options
author | dgp <dgp@noemail.net> | 2003-09-17 23:45:34 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2003-09-17 23:45:34 (GMT) |
commit | 457873e3a96be5d61739b4d11b4578dd1048bb15 (patch) | |
tree | 83f58673700c439ea545d6c2466e88abef0aad12 /tests/image.test | |
parent | b318e2fef43f19f55d943d2ec15b0d6c1bc126e0 (diff) | |
download | tk-457873e3a96be5d61739b4d11b4578dd1048bb15.zip tk-457873e3a96be5d61739b4d11b4578dd1048bb15.tar.gz tk-457873e3a96be5d61739b4d11b4578dd1048bb15.tar.bz2 |
* generic/tkImage.c: Stopped [image create] from generating an
* tests/image.test: image command name that would overwrite an
existing command name. Thanks to Michael Schlenker. [Bug 808039].
FossilOrigin-Name: 3023c17eaf943a887e0b043c7e6094ced7177168
Diffstat (limited to 'tests/image.test')
-rw-r--r-- | tests/image.test | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/image.test b/tests/image.test index 7199fc9..d318713 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.10 2003/05/08 09:35:41 dkf Exp $ +# RCS: @(#) $Id: image.test,v 1.11 2003/09/17 23:45:35 dgp Exp $ package require tcltest 2.1 eval tcltest::configure $argv @@ -86,6 +86,18 @@ test image-1.11 {Tk_ImageCmd procedure, "create" option with same name as main w removeFile script set x } {0 {1 {images may not be named the same as the main window}}} +test image-1.11 {Tk_ImageCmd, "create" option: do not generated command name in use} -setup { + set i [image create bitmap] + regexp {^image(\d+)$} $i -> serial + incr serial + proc image$serial {} {return works} + set j [image create bitmap] +} -body { + image$serial +} -cleanup { + rename image$serial {} + image delete $i $j +} -result works test image-2.1 {Tk_ImageCmd procedure, "delete" option} { list [catch {image delete} msg] $msg |