From d138d28133e65fbabfecdf4ed817196b81debc81 Mon Sep 17 00:00:00 2001 From: pooryorick Date: Sun, 1 Dec 2019 13:48:48 +0000 Subject: Fix tcltest::SetupTest added in previous commit. --- library/tcltest/tcltest.tcl | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index 2d36d13..820e978 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -1983,8 +1983,9 @@ proc tcltest::test {name description args} { } # First, run the setup script - lassign [uplevel 1 [list [ - namespace which SetupScript] $setup]] code setupMsg + set code [catch { + uplevel 1 [list [namespace which SetupTest] $setup] + } setupMsg] if {$code == 1} { set errorInfo(setup) $::errorInfo set errorCodeRes(setup) $::errorCode @@ -2368,11 +2369,8 @@ proc tcltest::RunTest {name script} { # # Evaluates the -setup script for a test -proc tcltest::SetupTest {name script} { - DebugPuts 3 [list Setup Script for $name $script] - - set code [catch {uplevel 1 $setup} setupMsg] - return [list $code $setupMsg] +proc tcltest::SetupTest setup { + uplevel 1 $setup } ##################################################################### -- cgit v0.12