summaryrefslogtreecommitdiffstats
path: root/library/tcltest
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2014-06-20 20:50:48 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2014-06-20 20:50:48 (GMT)
commitb45ad18c6c725693ccb23cad53b0264b3c368259 (patch)
treeb6fc50833b38b61331ded4df2b5e4d8332316685 /library/tcltest
parente69901045e82f866693fcb6716831418846e2bac (diff)
downloadtcl-b45ad18c6c725693ccb23cad53b0264b3c368259.zip
tcl-b45ad18c6c725693ccb23cad53b0264b3c368259.tar.gz
tcl-b45ad18c6c725693ccb23cad53b0264b3c368259.tar.bz2
previous commit was not quite right, this one should be betterbug_2f9df4c4fa
Diffstat (limited to 'library/tcltest')
-rw-r--r--library/tcltest/tcltest.tcl28
1 files changed, 14 insertions, 14 deletions
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl
index 7dd969b..22d79e1 100644
--- a/library/tcltest/tcltest.tcl
+++ b/library/tcltest/tcltest.tcl
@@ -1991,20 +1991,6 @@ proc tcltest::test {name description args} {
}
}
- # check if the return code matched the expected return code
- set codeFailure 0
- if {!$setupFailure && ($returnCode ni $returnCodes)} {
- set codeFailure 1
- }
-
- # Always run the cleanup script
- set code [catch {uplevel 1 $cleanup} cleanupMsg]
- if {$code == 1} {
- set errorInfo(cleanup) $::errorInfo
- set errorCode(cleanup) $::errorCode
- }
- set cleanupFailure [expr {$code != 0}]
-
set coreFailure 0
set coreMsg ""
# check for a core file first - if one was created by the test,
@@ -2038,6 +2024,12 @@ proc tcltest::test {name description args} {
}
}
+ # check if the return code matched the expected return code
+ set codeFailure 0
+ if {!$setupFailure && ($returnCode ni $returnCodes)} {
+ set codeFailure 1
+ }
+
# If expected output/error strings exist, we have to compare
# them. If the comparison fails, then so did the test.
set outputFailure 0
@@ -2076,6 +2068,14 @@ proc tcltest::test {name description args} {
set scriptFailure 1
}
+ # Always run the cleanup script
+ set code [catch {uplevel 1 $cleanup} cleanupMsg]
+ if {$code == 1} {
+ set errorInfo(cleanup) $::errorInfo
+ set errorCode(cleanup) $::errorCode
+ }
+ set cleanupFailure [expr {$code != 0}]
+
# if we didn't experience any failures, then we passed
variable numTests
if {!($setupFailure || $cleanupFailure || $coreFailure