diff options
author | dgp <dgp@noemail.net> | 2004-05-26 15:13:46 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2004-05-26 15:13:46 (GMT) |
commit | 918f9f9e1148e158b51c0f76bba3a738f09c1496 (patch) | |
tree | 06838e4e2852625b7bf4ca52ded1effcfd0549b8 /tests/tcltest.test | |
parent | 57195263f8183ef9059bdbc237b97593c58ed445 (diff) | |
download | tcl-918f9f9e1148e158b51c0f76bba3a738f09c1496.zip tcl-918f9f9e1148e158b51c0f76bba3a738f09c1496.tar.gz tcl-918f9f9e1148e158b51c0f76bba3a738f09c1496.tar.bz2 |
* library/tcltest/tcltest.tcl: Correction to debug prints and testing
* library/tcltest/pkgIndex.tcl: if TCLTEST_OPTIONS value. Updated
* tests/tcltest.test: tcltest-19.1 to tcltest 2.1 behavior.
Bumped to tcltest 2.2.6.
FossilOrigin-Name: 995b6581d191282b1e6a5ee70c94b4c277457ba5
Diffstat (limited to 'tests/tcltest.test')
-rwxr-xr-x | tests/tcltest.test | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/tests/tcltest.test b/tests/tcltest.test index 165e070..e4cfc75 100755 --- a/tests/tcltest.test +++ b/tests/tcltest.test @@ -6,7 +6,7 @@ # Copyright (c) 2000 by Ajuba Solutions # All rights reserved. # -# RCS: @(#) $Id: tcltest.test,v 1.37.2.2 2004/05/04 19:50:41 dgp Exp $ +# RCS: @(#) $Id: tcltest.test,v 1.37.2.3 2004/05/26 15:13:50 dgp Exp $ # Note that there are several places where the value of # tcltest::currentFailure is stored/reset in the -setup/-cleanup @@ -1082,38 +1082,36 @@ removeDirectory dirtestdir2.1 $dtd removeDirectory dirtestdir # TCLTEST_OPTIONS -test tcltest-19.1 {TCLTEST_OPTIONS default} { - -constraints {unixOrPc singleTestInterp} - -setup { +test tcltest-19.1 {TCLTEST_OPTIONS default} -setup { if {[info exists ::env(TCLTEST_OPTIONS)]} { set oldoptions $::env(TCLTEST_OPTIONS) - unset ::env(TCLTEST_OPTIONS) } else { set oldoptions none } # set this to { } instead of just {} to get around quirk in # Windows env handling that removes empty elements from env array. set ::env(TCLTEST_OPTIONS) { } - set olddebug [debug] - debug 2 - } - -cleanup { + interp create slave1 + slave1 eval [list set argv {-debug 2}] + slave1 alias puts puts + interp create slave2 + slave2 alias puts puts + } -cleanup { + interp delete slave2 + interp delete slave1 if {$oldoptions == "none"} { unset ::env(TCLTEST_OPTIONS) } else { set ::env(TCLTEST_OPTIONS) $oldoptions } - debug $olddebug - } - -body { - ::tcltest::ProcessCmdLineArgs + } -body { + slave1 eval [package ifneeded tcltest [package provide tcltest]] + slave1 eval tcltest::debug set ::env(TCLTEST_OPTIONS) "-debug 3" - ::tcltest::ProcessCmdLineArgs - } - -result {^$} - -match regexp - -output {tcltest::debug\s+= 2.*tcltest::debug\s+= 3} -} + slave2 eval [package ifneeded tcltest [package provide tcltest]] + slave2 eval tcltest::debug + } -result {^3$} -match regexp -output\ +{tcltest::debug\s+= 2.*tcltest::debug\s+= 3} # Begin testing of tcltest procs ... |