diff options
author | dgp <dgp@noemail.net> | 2002-07-14 18:29:48 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2002-07-14 18:29:48 (GMT) |
commit | 4d9856b76280220e11b5ffc21491a26043ce50eb (patch) | |
tree | e4c33f136c3695ea1843e46a7484b43ae3875acb /library | |
parent | 4a616b0e2ddd8090fd26d5c133cb8848a2b18c70 (diff) | |
download | tcl-4d9856b76280220e11b5ffc21491a26043ce50eb.zip tcl-4d9856b76280220e11b5ffc21491a26043ce50eb.tar.gz tcl-4d9856b76280220e11b5ffc21491a26043ce50eb.tar.bz2 |
* library/tcltest/tcltest.tcl: Corrected errors in handling of
configuration options -constraints and -limitconstraints.
FossilOrigin-Name: 9ca3ea3935af46324b53d59f5de04f9c484c6445
Diffstat (limited to 'library')
-rw-r--r-- | library/tcltest/tcltest.tcl | 10 |
1 files changed, 6 insertions, 4 deletions
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 |