From 6589dad62592f0a6175b2c711ed1533dbe093225 Mon Sep 17 00:00:00 2001 From: dgp Date: Sun, 14 Jul 2002 18:29:49 +0000 Subject: * library/tcltest/tcltest.tcl: Corrected errors in handling of configuration options -constraints and -limitconstraints. --- ChangeLog | 3 +++ library/tcltest/tcltest.tcl | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index addc1d8..b366260 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ 2002-07-14 Don Porter + + * library/tcltest/tcltest.tcl: Corrected errors in handling of + configuration options -constraints and -limitconstraints. * README: Bumped HEAD to version 8.4b2 so we can * generic/tcl.h: distinguish it from the 8.4b1 release. diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index b302e94..13cf7ae 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -16,7 +16,7 @@ # Contributions from Don Porter, NIST, 2002. (not subject to US copyright) # All rights reserved. # -# RCS: @(#) $Id: tcltest.tcl,v 1.70 2002/07/11 19:02:58 dgp Exp $ +# RCS: @(#) $Id: tcltest.tcl,v 1.71 2002/07/14 18:29:49 dgp Exp $ package require Tcl 8.3 ;# uses [glob -directory] namespace eval tcltest { @@ -626,7 +626,7 @@ namespace eval tcltest { if {!$Option(-limitconstraints)} {return} foreach c [array names testConstraints] { if {[lsearch -exact $Option(-constraints) $c] == -1} { - testConstraint $elt 0 + testConstraint $c 0 } } } @@ -847,6 +847,7 @@ proc tcltest::mainThread { {new ""} } { proc tcltest::testConstraint {constraint {value ""}} { variable testConstraints + variable Option DebugPuts 3 "entering testConstraint $constraint $value" if {[llength [info level 0]] == 2} { return $testConstraints($constraint) @@ -855,7 +856,8 @@ proc tcltest::testConstraint {constraint {value ""}} { if {[catch {expr {$value && $value}} msg]} { return -code error $msg } - if {[limitConstraints]} { + if {[limitConstraints] + && [lsearch -exact $Option(-constraints) $constraint] == -1} { set value 0 } set testConstraints($constraint) $value @@ -3282,7 +3284,7 @@ namespace eval tcltest { proc LoadTimeCmdLineArgParsingRequired {} { set required false - if {[info exists ::argv] && [lsearch -exact $::argv -help]} { + if {[info exists ::argv] && [lsearch -exact $::argv -help] != -1} { # The command line asks for -help, so give it (and exit) # right now. ([configure] does not process -help) set required true -- cgit v0.12