diff options
author | dgp <dgp@users.sourceforge.net> | 2002-03-24 18:57:51 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2002-03-24 18:57:51 (GMT) |
commit | 89251155b717d5db7d6defbd0a87d498d7941629 (patch) | |
tree | f932373c280ddd029d4a6f0ef42dcc35ac80b3b0 /library/tcltest | |
parent | b81b0779c56b017a12588c6800507f3cef5fc499 (diff) | |
download | tcl-89251155b717d5db7d6defbd0a87d498d7941629.zip tcl-89251155b717d5db7d6defbd0a87d498d7941629.tar.gz tcl-89251155b717d5db7d6defbd0a87d498d7941629.tar.bz2 |
* Use [interpreter] to set/query the
executable currently running the tcltest package. [Bug 454050]
Diffstat (limited to 'library/tcltest')
-rw-r--r-- | library/tcltest/tcltest.tcl | 20 |
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 |