summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-05-26 15:13:47 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-05-26 15:13:47 (GMT)
commitdc99340ce6d28dea1878ff46900fcd01528947cb (patch)
tree06838e4e2852625b7bf4ca52ded1effcfd0549b8 /tests
parentbde979906035bbdc9ff1001cb4a4b64a5dd6b813 (diff)
downloadtcl-dc99340ce6d28dea1878ff46900fcd01528947cb.zip
tcl-dc99340ce6d28dea1878ff46900fcd01528947cb.tar.gz
tcl-dc99340ce6d28dea1878ff46900fcd01528947cb.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.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/tcltest.test36
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 ...