summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-03-25 19:20:02 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-03-25 19:20:02 (GMT)
commit03770a2f62e8472b753078073b20ed5f20b889e9 (patch)
treea7d24830d5fd0441b7565e6fe8c728cb052422b4 /library
parentf7f08ed212e20480dabd9801880cb3b7b9fb9343 (diff)
downloadtcl-03770a2f62e8472b753078073b20ed5f20b889e9.zip
tcl-03770a2f62e8472b753078073b20ed5f20b889e9.tar.gz
tcl-03770a2f62e8472b753078073b20ed5f20b889e9.tar.bz2
* Improve the processing of the -constraints option to [test] so that
constraint lists can have arbitrary whitespace, and non-lists don't blow things up. [Bug 495977]
Diffstat (limited to 'library')
-rw-r--r--library/tcltest/tcltest.tcl6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl
index 1667bea..6cb60c3 100644
--- a/library/tcltest/tcltest.tcl
+++ b/library/tcltest/tcltest.tcl
@@ -13,7 +13,7 @@
# Copyright (c) 2000 by Ajuba Solutions
# All rights reserved.
#
-# RCS: @(#) $Id: tcltest.tcl,v 1.38 2002/03/25 17:10:57 dgp Exp $
+# RCS: @(#) $Id: tcltest.tcl,v 1.39 2002/03/25 19:20:03 dgp Exp $
# create the "tcltest" namespace for all testing variables and procedures
@@ -2479,13 +2479,13 @@ proc tcltest::runTest {name description script expectedAnswer constraints} {
if {[string match {*[$\[]*} $constraints] != 0} {
# full expression, e.g. {$foo > [info tclversion]}
catch {set doTest [uplevel #0 expr $constraints]}
- } elseif {[regexp {[^.a-zA-Z0-9 ]+} $constraints] != 0} {
+ } elseif {[regexp {[^.a-zA-Z0-9 \n\r\t]+} $constraints] != 0} {
# something like {a || b} should be turned into
# $tcltest::testConstraints(a) || $tcltest::testConstraints(b).
regsub -all {[.\w]+} $constraints \
{$tcltest::testConstraints(&)} c
catch {set doTest [eval expr $c]}
- } else {
+ } elseif {![catch {llength $constraints}]} {
# just simple constraints such as {unixOnly fonts}.
set doTest 1
foreach constraint $constraints {