summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog16
-rw-r--r--library/tcltest/pkgIndex.tcl2
-rw-r--r--library/tcltest/tcltest.tcl24
-rw-r--r--tests/msgcat.test4
4 files changed, 33 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 12fbcc3..260ec1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2003-03-26 Don Porter <dgp@users.sourceforge.net>
+
+ * library/tcltest/tcltest.tcl: Added reporting during
+ [configure -debug 1] operations to warn about multiple uses of
+ the same test name. [FR 576693] Replaced [regexp] and [regsub]
+ with [string map] where possible. Thanks to David Welton.
+ [Bugs 667456,667558]
+ * library/tcltest/pkgIndex.tcl: Bumped to tcltest 2.2.3
+
+ * tests/msgcat.test (msgcat-2.2.1): changed test name to avoid
+ duplication. [Bug 710356]
+
+ * unix/dltest/pkg?.c: Changed all Tcl_InitStubs calls to pass
+ argument exact = 0, so that rebuilds are not required when Tcl
+ bumps to a new version. [Bug 701926]
+
2003-03-24 Miguel Sofer <msofer@users.sf.net>
* generic/tclVar.c:
diff --git a/library/tcltest/pkgIndex.tcl b/library/tcltest/pkgIndex.tcl
index 345740a..b91babd 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.2 [list source [file join $dir tcltest.tcl]]
+package ifneeded tcltest 2.2.3 [list source [file join $dir tcltest.tcl]]
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl
index 7d119c7..4b7bf67 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.78 2003/02/17 19:12:06 dgp Exp $
+# RCS: @(#) $Id: tcltest.tcl,v 1.78.2.1 2003/03/26 22:56:09 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.2
+ variable Version 2.2.3
# Compatibility support for dumb variables defined in tcltest 1
# Do not use these. Call [package provide Tcl] and [info patchlevel]
@@ -1842,6 +1842,13 @@ proc tcltest::test {name description args} {
variable testLevel
variable coreModTime
DebugPuts 3 "test $name $args"
+ DebugDo 1 {
+ variable TestNames
+ catch {
+ puts "test name '$name' re-used; prior use in $TestNames($name)"
+ }
+ set TestNames($name) [info script]
+ }
FillFilesExisted
incr testLevel
@@ -1912,11 +1919,9 @@ proc tcltest::test {name description args} {
}
# Replace symbolic valies supplied for -returnCodes
- regsub -nocase normal $returnCodes 0 returnCodes
- regsub -nocase error $returnCodes 1 returnCodes
- regsub -nocase return $returnCodes 2 returnCodes
- regsub -nocase break $returnCodes 3 returnCodes
- regsub -nocase continue $returnCodes 4 returnCodes
+ foreach {strcode numcode} {normal 0 error 1 return 2 break 3 continue 4} {
+ set returnCodes [string map -nocase [list $strcode $numcode] $returnCodes]
+ }
} else {
# This is parsing for the old test command format; it is here
# for backward compatibility.
@@ -2882,9 +2887,8 @@ proc tcltest::restoreState {} {
proc tcltest::normalizeMsg {msg} {
regsub "\n$" [string tolower $msg] "" msg
- regsub -all "\n\n" $msg "\n" msg
- regsub -all "\n\}" $msg "\}" msg
- return $msg
+ set msg [string map [list "\n\n" "\n"] $msg]
+ return [string map [list "\n\}" "\}"] $msg]
}
# tcltest::makeFile --
diff --git a/tests/msgcat.test b/tests/msgcat.test
index 2ea01cd..216e2e7 100644
--- a/tests/msgcat.test
+++ b/tests/msgcat.test
@@ -12,7 +12,7 @@
# Note that after running these tests, entries will be left behind in the
# message catalogs for locales foo, foo_BAR, and foo_BAR_baz.
#
-# RCS: @(#) $Id: msgcat.test,v 1.11 2002/06/17 05:37:39 dgp Exp $
+# RCS: @(#) $Id: msgcat.test,v 1.11.2.1 2003/03/26 22:56:09 dgp Exp $
package require Tcl 8.2
if {[catch {package require tcltest 2}]} {
@@ -175,7 +175,7 @@ namespace eval ::msgcat::test {
namespace eval :: ::msgcat::mcset foo_BAR text3
} {text3}
- test msgcat-2.2 {mcset, namespace overlap} {
+ test msgcat-2.2.1 {mcset, namespace overlap} {
namespace eval baz {::msgcat::mcset foo_BAR con1 con1baz}
} {con1baz}