summaryrefslogtreecommitdiffstats
path: root/library/tcltest/tcltest.tcl
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2009-04-08 16:05:15 (GMT)
committerdgp <dgp@users.sourceforge.net>2009-04-08 16:05:15 (GMT)
commitffc8f6440e2b529e2f41d8952fa7392213511ef6 (patch)
tree690794e1c446ef9e31631a0d0b5fb67218d8460b /library/tcltest/tcltest.tcl
parent6df16152535178264e5b70e09d4f5adf03fcd404 (diff)
downloadtcl-ffc8f6440e2b529e2f41d8952fa7392213511ef6.zip
tcl-ffc8f6440e2b529e2f41d8952fa7392213511ef6.tar.gz
tcl-ffc8f6440e2b529e2f41d8952fa7392213511ef6.tar.bz2
* library/tcltest/tcltest.tcl: Converted [eval]s (some unsafe!) to
* library/tcltest/pkgIndex.tcl: {*} in tcltest package. [Bug 2570363] * unix/Makefile.in: => tcltest 2.3.1 * win/Makefile.in:
Diffstat (limited to 'library/tcltest/tcltest.tcl')
-rw-r--r--library/tcltest/tcltest.tcl20
1 files changed, 10 insertions, 10 deletions
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl
index d799eb0..f363c80 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.103 2007/12/13 15:26:03 dgp Exp $
+# RCS: @(#) $Id: tcltest.tcl,v 1.104 2009/04/08 16:05:15 dgp Exp $
package require Tcl 8.5 ;# -verbose line uses [info frame]
namespace eval tcltest {
@@ -24,7 +24,7 @@ namespace eval tcltest {
# When the version number changes, be sure to update the pkgIndex.tcl file,
# and the install directory in the Makefiles. When the minor version
# changes (new feature) be sure to update the man page as well.
- variable Version 2.3.0
+ variable Version 2.3.1
# Compatibility support for dumb variables defined in tcltest 1
# Do not use these. Call [package provide Tcl] and [info patchlevel]
@@ -602,7 +602,7 @@ namespace eval tcltest {
}
proc configure args {
RemoveAutoConfigureTraces
- set code [catch {eval Configure $args} msg]
+ set code [catch {Configure {*}$args} msg]
return -code $code $msg
}
@@ -1420,7 +1420,7 @@ proc tcltest::ProcessFlags {flagArray} {
RemoveAutoConfigureTraces
} else {
set args $flagArray
- while {[llength $args]>1 && [catch {eval configure $args} msg]} {
+ while {[llength $args]>1 && [catch {configure {*}$args} msg]} {
# Something went wrong parsing $args for tcltest options
# Check whether the problem is "unknown option"
@@ -1585,7 +1585,7 @@ proc tcltest::Replace::puts {args} {
# If we haven't returned by now, we don't know how to handle the
# input. Let puts handle it.
- return [eval Puts $args]
+ return [Puts {*}$args]
}
# tcltest::Eval --
@@ -2242,12 +2242,12 @@ proc tcltest::Skipped {name constraints} {
set doTest 0
if {[string match {*[$\[]*} $constraints] != 0} {
# full expression, e.g. {$foo > [info tclversion]}
- catch {set doTest [uplevel #0 expr $constraints]}
+ catch {set doTest [uplevel #0 [list expr $constraints]]}
} elseif {[regexp {[^.:_a-zA-Z0-9 \n\r\t]+} $constraints] != 0} {
# something like {a || b} should be turned into
# $testConstraints(a) || $testConstraints(b).
regsub -all {[.\w]+} $constraints {$testConstraints(&)} c
- catch {set doTest [eval expr $c]}
+ catch {set doTest [eval [list expr $c]]}
} elseif {![catch {llength $constraints}]} {
# just simple constraints such as {unixOnly fonts}.
set doTest 1
@@ -2571,7 +2571,7 @@ proc tcltest::cleanupTests {{calledFromAllFile 0}} {
# None
# a lower case version is needed for compatibility with tcltest 1.0
-proc tcltest::getMatchingFiles args {eval GetMatchingFiles $args}
+proc tcltest::getMatchingFiles args {GetMatchingFiles {*}$args}
proc tcltest::GetMatchingFiles { args } {
if {[llength $args]} {
@@ -3326,12 +3326,12 @@ namespace eval tcltest {
Tcl list: $msg"
return
}
- if {[llength $::env(TCLTEST_OPTIONS)] % 2} {
+ if {[llength $options] % 2} {
Warn "invalid TCLTEST_OPTIONS: \"$options\":\n should be\
-option value ?-option value ...?"
return
}
- if {[catch {eval Configure $::env(TCLTEST_OPTIONS)} msg]} {
+ if {[catch {Configure {*}$options} msg]} {
Warn "invalid TCLTEST_OPTIONS: \"$options\":\n $msg"
return
}