From 19458a73a3f2e0d6dc63f4127d47ca3f48af0e5d Mon Sep 17 00:00:00 2001 From: patthoyts Date: Sun, 11 Jan 2009 23:37:15 +0000 Subject: [Bug 2495740] result needed to exclude any images already present. --- tests/button.test | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/button.test b/tests/button.test index bfa621c..ee59731 100644 --- a/tests/button.test +++ b/tests/button.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: button.test,v 1.23 2008/07/23 23:24:25 nijtmans Exp $ +# RCS: @(#) $Id: button.test,v 1.24 2009/01/11 23:37:15 patthoyts Exp $ package require tcltest 2.2 namespace import ::tcltest::* @@ -3256,13 +3256,18 @@ test button-5.4 {ConfigureButton - variable trace} -body { ;# ex 6.2a test button-5.5 {ConfigureButton - image handling} -constraints { testImageType } -setup { + set images [image names] image create test image1 image create test image2 } -body { button .b -image image1 image delete image1 .b configure -image image2 - image names + set result {} + foreach image [image names] { + if {$image ni $images} { lappend result $image } + } + set result } -cleanup { destroy .b image delete image2 -- cgit v0.12