diff options
author | dgp <dgp@users.sourceforge.net> | 2004-11-02 19:03:04 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2004-11-02 19:03:04 (GMT) |
commit | 056a367469619bbaefcab3198b931112d8590a10 (patch) | |
tree | 43d52e5aac7dbc1f74096edb2e9afc91b6f30b1a /tests/tcltest.test | |
parent | 36379d6c39bba5e662f7e52384c5d5fa32d1bd98 (diff) | |
download | tcl-056a367469619bbaefcab3198b931112d8590a10.zip tcl-056a367469619bbaefcab3198b931112d8590a10.tar.gz tcl-056a367469619bbaefcab3198b931112d8590a10.tar.bz2 |
2004-11-02 Don Porter <dgp@users.sourceforge.net>
* library/tcltest/tcltest.tcl: Corrected some misleading
* tests/tcltest.test (tcltest-26.1,2): displays of ::errorInfo and
::errorCode information when the -setup, -body, and/or -cleanup scripts
return an unexpected return code. Thanks to Robert Seeger for the
fix. [RFE 1017151].
Diffstat (limited to 'tests/tcltest.test')
-rwxr-xr-x | tests/tcltest.test | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/tests/tcltest.test b/tests/tcltest.test index 90a87af..ae5332d 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.5 2004/10/26 20:14:37 dgp Exp $ +# RCS: @(#) $Id: tcltest.test,v 1.37.2.6 2004/11/02 19:03:08 dgp Exp $ # Note that there are several places where the value of # tcltest::currentFailure is stored/reset in the -setup/-cleanup @@ -1740,6 +1740,47 @@ test tcltest-25.3 { verbose $v } -match glob -output {*generated error; Return code was: 1*} +test tcltest-26.1 {Bug/RFE 1017151} -setup { + makeFile { + package require tcltest + set errorInfo "Should never see this" + tcltest::test tcltest-26.1.0 { + no errorInfo when only return code mismatch + } -body { + set x 1 + } -returnCodes error -result 1 + tcltest::cleanupTests + } test.tcl +} -body { + slave msg test.tcl + set msg +} -cleanup { + removeFile test.tcl +} -match glob -result {* +---- Return code should have been one of: 1 +==== tcltest-26.1.0 FAILED*} + +test tcltest-26.2 {Bug/RFE 1017151} -setup { + makeFile { + package require tcltest + set errorInfo "Should never see this" + tcltest::test tcltest-26.2.0 {do not mask body errorInfo} -body { + error "body error" + } -cleanup { + error "cleanup error" + } -result 1 + tcltest::cleanupTests + } test.tcl +} -body { + slave msg test.tcl + set msg +} -cleanup { + removeFile test.tcl +} -match glob -result {* +---- errorInfo: body error +* +---- errorInfo(cleanup): cleanup error*} + cleanupTests } |