diff options
author | dgp <dgp@users.sourceforge.net> | 2003-09-17 23:45:05 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2003-09-17 23:45:05 (GMT) |
commit | b7010a3a3dc4c967c76e9ed89cb5d8c3079f889a (patch) | |
tree | 8c012bdb25f7fdb644aaa9ff6419a25fb5ed77e4 /tests/image.test | |
parent | 5a716d9ebd3d3e69f016cf11aae0c46d45f987ae (diff) | |
download | tk-b7010a3a3dc4c967c76e9ed89cb5d8c3079f889a.zip tk-b7010a3a3dc4c967c76e9ed89cb5d8c3079f889a.tar.gz tk-b7010a3a3dc4c967c76e9ed89cb5d8c3079f889a.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].
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 dd5d3dd..7e35f9a 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.8 2003/01/22 14:32:59 dkf Exp $ +# RCS: @(#) $Id: image.test,v 1.8.2.1 2003/09/17 23:45:05 dgp Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -93,6 +93,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 |