summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-12-01 17:00:20 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-12-01 17:00:20 (GMT)
commit3ea27f399fc835f0714c8417998e35c35783f17f (patch)
treeb9ebd7a8545f7089c47756a911cda2f66b7a447a /library
parent5fc479ca038640dedbe1fe3956effbb85ef47d3f (diff)
parent7363d850a9f55fcadb58e4f6791cb0475dd5bdcf (diff)
downloadtcl-3ea27f399fc835f0714c8417998e35c35783f17f.zip
tcl-3ea27f399fc835f0714c8417998e35c35783f17f.tar.gz
tcl-3ea27f399fc835f0714c8417998e35c35783f17f.tar.bz2
Merge 8.7
Diffstat (limited to 'library')
-rw-r--r--library/tcltest/tcltest.tcl16
1 files changed, 15 insertions, 1 deletions
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl
index a7a68c7..820e978 100644
--- a/library/tcltest/tcltest.tcl
+++ b/library/tcltest/tcltest.tcl
@@ -1983,7 +1983,9 @@ proc tcltest::test {name description args} {
}
# First, run the setup script
- set code [catch {uplevel 1 $setup} setupMsg]
+ set code [catch {
+ uplevel 1 [list [namespace which SetupTest] $setup]
+ } setupMsg]
if {$code == 1} {
set errorInfo(setup) $::errorInfo
set errorCodeRes(setup) $::errorCode
@@ -2338,6 +2340,8 @@ proc tcltest::Skipped {name constraints} {
return 0
}
+
+
# RunTest --
#
# This is where the body of a test is evaluated. The combination of
@@ -2359,6 +2363,16 @@ proc tcltest::RunTest {name script} {
return [list $actualAnswer $code]
}
+
+
+# SetupTest --
+#
+# Evaluates the -setup script for a test
+
+proc tcltest::SetupTest setup {
+ uplevel 1 $setup
+}
+
#####################################################################
# tcltest::cleanupTestsHook --