summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2002-03-24 18:57:51 (GMT)
committerdgp <dgp@noemail.net>2002-03-24 18:57:51 (GMT)
commit183db55d36247339c519c4e1702008bf21af1f6a (patch)
treef932373c280ddd029d4a6f0ef42dcc35ac80b3b0 /library
parentc91c46ee4d3893b6479d999ec7d2d3b97570de47 (diff)
downloadtcl-183db55d36247339c519c4e1702008bf21af1f6a.zip
tcl-183db55d36247339c519c4e1702008bf21af1f6a.tar.gz
tcl-183db55d36247339c519c4e1702008bf21af1f6a.tar.bz2
* Use [interpreter] to set/query the
executable currently running the tcltest package. [Bug 454050] FossilOrigin-Name: c14a78f9406ebaa91bf775520bd4cb0df7218e0d
Diffstat (limited to 'library')
-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 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