summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-11-02 19:03:29 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-11-02 19:03:29 (GMT)
commit113aefb96e7d02c017c28e139f8468a088e4cb6c (patch)
tree6256a25325cd78964bcd3c3ad278fdfee7c50896 /tests
parent5fb82ec7d47e27157b43708103e701c7a380c9d3 (diff)
downloadtcl-113aefb96e7d02c017c28e139f8468a088e4cb6c.zip
tcl-113aefb96e7d02c017c28e139f8468a088e4cb6c.tar.gz
tcl-113aefb96e7d02c017c28e139f8468a088e4cb6c.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')
-rwxr-xr-xtests/tcltest.test43
1 files changed, 42 insertions, 1 deletions
diff --git a/tests/tcltest.test b/tests/tcltest.test
index 6e2ba7b..5dee76f 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.45 2004/09/11 00:39:47 davygrvy Exp $
+# RCS: @(#) $Id: tcltest.test,v 1.46 2004/11/02 19:03:29 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
}