diff options
author | pspjuth <peter.spjuth@gmail.com> | 2018-10-22 20:27:03 (GMT) |
---|---|---|
committer | pspjuth <peter.spjuth@gmail.com> | 2018-10-22 20:27:03 (GMT) |
commit | 5b1614f31a3c2c510c726089b6ca499cfb792e72 (patch) | |
tree | b6582cb127888e854c6cca4bc58e29ff51b0577f /library | |
parent | 8c05c20df453400c69cdcddd621fd9fc7e692e73 (diff) | |
download | tcl-5b1614f31a3c2c510c726089b6ca499cfb792e72.zip tcl-5b1614f31a3c2c510c726089b6ca499cfb792e72.tar.gz tcl-5b1614f31a3c2c510c726089b6ca499cfb792e72.tar.bz2 |
Documentation and revision bump for tip 522
Diffstat (limited to 'library')
-rw-r--r-- | library/init.tcl | 2 | ||||
-rw-r--r-- | library/tcltest/pkgIndex.tcl | 2 | ||||
-rw-r--r-- | library/tcltest/tcltest.tcl | 10 |
3 files changed, 8 insertions, 6 deletions
diff --git a/library/init.tcl b/library/init.tcl index 51339d0..1221e61 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -810,7 +810,7 @@ foreach {safe package version file} { 1 opt 0.4.7 {opt optparse.tcl} 0 platform 1.0.14 {platform platform.tcl} 0 platform::shell 1.1.4 {platform shell.tcl} - 1 tcltest 2.4.1 {tcltest tcltest.tcl} + 1 tcltest 2.5.0 {tcltest tcltest.tcl} } { if {$isafe && !$safe} continue package ifneeded $package $version [list source [file join $dir {*}$file]] diff --git a/library/tcltest/pkgIndex.tcl b/library/tcltest/pkgIndex.tcl index eadb1bd..fde3ffe 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.5-]} {return} -package ifneeded tcltest 2.4.1 [list source [file join $dir tcltest.tcl]] +package ifneeded tcltest 2.5.0 [list source [file join $dir tcltest.tcl]] diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index a4954e7..8b14142 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -22,7 +22,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.4.1 + variable Version 2.5.0 # Compatibility support for dumb variables defined in tcltest 1 # Do not use these. Call [package provide Tcl] and [info patchlevel] @@ -1842,7 +1842,7 @@ proc tcltest::SubstArguments {argList} { # returnCodes - Expected return codes. This attribute is # optional; default is {0 2}. # errorCode - Expected error code. This attribute is -# optional; default is {}. It is a glob pattern. +# optional; default is {*}. It is a glob pattern. # If given, returnCodes defaults to {1}. # setup - Code to run before $script (above). This # attribute is optional; default is {}. @@ -1895,6 +1895,9 @@ proc tcltest::test {name description args} { # 'return' being used in the test script). set returnCodes [list 0 2] + # Set the default error code pattern + set errorCode "*" + # The old test format can't have a 3rd argument (constraints or # script) that starts with '-'. if {[string match -* [lindex $args 0]] || ([llength $args] <= 1)} { @@ -1948,7 +1951,7 @@ proc tcltest::test {name description args} { set returnCodes [string map -nocase [list $strcode $numcode] $returnCodes] } # errorCode without returnCode 1 is meaningless - if {$errorCode ne "" && 1 ni $returnCodes} { + if {$errorCode ne "*" && 1 ni $returnCodes} { set returnCodes 1 } } else { @@ -2021,7 +2024,6 @@ proc tcltest::test {name description args} { } set errCodeFailure 0 if {!$setupFailure && !$codeFailure && $returnCode == 1 && \ - $errorCode ne "" && \ ![string match $errorCode $errorCodeRes(body)]} { set codeFailure 1 set errCodeFailure 1 |