summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--library/tcltest/tcltest.tcl20
2 files changed, 13 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 6f5ec22..5abd797 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2002-03-24 Don Porter <dgp@users.sourceforge.net>
+ * library/tcltest/tcltest.tcl: Use [interpreter] to set/query the
+ executable currently running the tcltest package. [Bug 454050]
+
* library/tcltest/tcltest.tcl: Allow non-proc commands to be used
as the customization hooks. [Bug 495662]
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl
index f602d86..d08e975 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.36 2002/03/24 17:21:12 dgp Exp $
+# RCS: @(#) $Id: tcltest.tcl,v 1.37 2002/03/24 18:57:53 dgp Exp $
# create the "tcltest" namespace for all testing variables and procedures
@@ -1130,10 +1130,15 @@ proc tcltest::singleProcess { {value ""} } {
# None.
proc tcltest::interpreter { {interp ""} } {
+ variable tcltest
if {[llength [info level 0]] == 1} {
- return $tcltest::tcltest
+ return $tcltest
+ }
+ if {$interp == "{}"} {
+ set tcltest {}
+ } else {
+ set tcltest $interp
}
- set tcltest::tcltest $interp
}
# tcltest::mainThread --
@@ -1483,13 +1488,8 @@ proc tcltest::initConstraints {} {
}
# Locate tcltest executable
-
if {![info exists tk_version]} {
- set tcltest::tcltest [info nameofexecutable]
-
- if {$tcltest::tcltest == "{}"} {
- set tcltest::tcltest {}
- }
+ interpreter [info nameofexecutable]
}
tcltest::testConstraint stdio 0
@@ -1501,7 +1501,7 @@ proc tcltest::initConstraints {} {
}
close $f
- set f [open "|[list $tcltest::tcltest tmp]" r]
+ set f [open "|[list [interpreter] tmp]" r]
close $f
tcltest::testConstraint stdio 1