summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-05-26 15:18:23 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-05-26 15:18:23 (GMT)
commit31e6ca71ca837cbe94666cbb737e6c11198f516f (patch)
tree1e59eb0ce25da8ee1d6e8fed4a3885c07df9b097
parent6418e217136079ba56cb50fea7ad22f0cc6b6dc0 (diff)
downloadtcl-31e6ca71ca837cbe94666cbb737e6c11198f516f.zip
tcl-31e6ca71ca837cbe94666cbb737e6c11198f516f.tar.gz
tcl-31e6ca71ca837cbe94666cbb737e6c11198f516f.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.
-rw-r--r--ChangeLog7
-rw-r--r--library/tcltest/pkgIndex.tcl2
-rw-r--r--library/tcltest/tcltest.tcl10
-rwxr-xr-xtests/tcltest.test36
4 files changed, 30 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index 90a66cc..e3247c9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-05-26 Don Porter <dgp@users.sourceforge.net>
+
+ * 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.
+
2004-05-25 Jeff Hobbs <jeffh@ActiveState.com>
* doc/http.n (http::config): add -urlencoding option (default utf-8)
diff --git a/library/tcltest/pkgIndex.tcl b/library/tcltest/pkgIndex.tcl
index 5ddc69c..6e0766e 100644
--- a/library/tcltest/pkgIndex.tcl
+++ b/library/tcltest/pkgIndex.tcl
@@ -9,4 +9,4 @@
# full path name of this file's directory.
if {![package vsatisfies [package provide Tcl] 8.3]} {return}
-package ifneeded tcltest 2.2.5 [list source [file join $dir tcltest.tcl]]
+package ifneeded tcltest 2.2.6 [list source [file join $dir tcltest.tcl]]
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl
index d037fd3..afa2e46 100644
--- a/library/tcltest/tcltest.tcl
+++ b/library/tcltest/tcltest.tcl
@@ -16,7 +16,7 @@
# Contributions from Don Porter, NIST, 2002. (not subject to US copyright)
# All rights reserved.
#
-# RCS: @(#) $Id: tcltest.tcl,v 1.89 2004/03/17 19:29:42 dgp Exp $
+# RCS: @(#) $Id: tcltest.tcl,v 1.90 2004/05/26 15:18:24 dgp Exp $
package require Tcl 8.3 ;# uses [glob -directory]
namespace eval tcltest {
@@ -24,7 +24,7 @@ namespace eval tcltest {
# When the version number changes, be sure to update the pkgIndex.tcl file,
# and the install directory in the Makefiles. When the minor version
# changes (new feature) be sure to update the man page as well.
- variable Version 2.2.5
+ variable Version 2.2.6
# Compatibility support for dumb variables defined in tcltest 1
# Do not use these. Call [package provide Tcl] and [info patchlevel]
@@ -1499,8 +1499,8 @@ proc tcltest::ProcessCmdLineArgs {} {
DebugPuts 2 \
" ::env(TCLTEST_OPTIONS): $::env(TCLTEST_OPTIONS)"
}
- if {[info exists argv]} {
- DebugPuts 2 " argv: $argv"
+ if {[info exists ::argv]} {
+ DebugPuts 2 " argv: $::argv"
}
DebugPuts 2 "tcltest::debug = [debug]"
DebugPuts 2 "tcltest::testsDirectory = [testsDirectory]"
@@ -3287,7 +3287,7 @@ namespace eval tcltest {
Tcl list: $msg"
return
}
- if {[llength $::env(TCLTEST_OPTIONS)] < 2} {
+ if {[llength $::env(TCLTEST_OPTIONS)] % 2} {
Warn "invalid TCLTEST_OPTIONS: \"$options\":\n should be\
-option value ?-option value ...?"
return
diff --git a/tests/tcltest.test b/tests/tcltest.test
index 3ffbfd7..b085c0a 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.41 2004/05/04 19:50:06 dgp Exp $
+# RCS: @(#) $Id: tcltest.test,v 1.42 2004/05/26 15:18:24 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 ...