From 8a02ee155f91a31fb66ddc39cbbf1d1bbbeb4f36 Mon Sep 17 00:00:00 2001 From: dgp Date: Sun, 24 Mar 2002 17:21:12 +0000 Subject: * Allow non-proc commands to be used as the customization hooks. [Bug 495662] --- ChangeLog | 5 +++++ library/tcltest/tcltest.tcl | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5e8fb2c..6f5ec22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-03-24 Don Porter + + * library/tcltest/tcltest.tcl: Allow non-proc commands to be used + as the customization hooks. [Bug 495662] + 2002-03-24 Vince Darley * generic/tclFilename.c: diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index 8757e0d..f602d86 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.35 2002/03/11 21:50:32 dgp Exp $ +# RCS: @(#) $Id: tcltest.tcl,v 1.36 2002/03/24 17:21:12 dgp Exp $ # create the "tcltest" namespace for all testing variables and procedures @@ -1243,7 +1243,7 @@ proc tcltest::PrintError {errorMsg} { return } -if {[namespace inscope tcltest info procs initConstraintsHook] == {}} { +if {[llength [info commands tcltest::initConstraintsHook]] == 0} { proc tcltest::initConstraintsHook {} {} } @@ -1538,7 +1538,7 @@ proc tcltest::initConstraints {} { # Hook used for customization of display of usage information. # -if {[namespace inscope tcltest info procs PrintUsageInfoHook] == {}} { +if {[llength [info commands tcltest::PrintUsageInfoHook]] == 0} { proc tcltest::PrintUsageInfoHook {} {} } @@ -1621,7 +1621,7 @@ proc tcltest::PrintUsageInfo {} { # ProcessFlags. # -if {[namespace inscope tcltest info procs processCmdLineArgsAddFlagsHook] == {}} { +if {[llength [info commands tcltest::processCmdLineArgsAddFlagsHook]] == 0} { proc tcltest::processCmdLineArgsAddFlagsHook {} {} } @@ -1635,7 +1635,7 @@ if {[namespace inscope tcltest info procs processCmdLineArgsAddFlagsHook] == {}} # flags The flags that have been pulled out of argv # -if {[namespace inscope tcltest info procs processCmdLineArgsHook] == {}} { +if {[llength [info commands tcltest::processCmdLineArgsHook]] == 0} { proc tcltest::processCmdLineArgsHook {flag} {} } @@ -2552,7 +2552,7 @@ proc tcltest::runTest {name description script expectedAnswer constraints} { # additional things that should be done at cleanup. # -if {[namespace inscope tcltest info procs cleanupTestsHook] == {}} { +if {[llength [info commands tcltest::cleanupTestsHook]] == 0} { proc tcltest::cleanupTestsHook {} {} } -- cgit v0.12