summaryrefslogtreecommitdiffstats
path: root/tests/result.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-06-05 17:57:05 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-06-05 17:57:05 (GMT)
commit0ce2a2cb2fb98447e3060196f2415dd267330e0d (patch)
treebaea8961dd7792cf7300ab1799771f4ebdc7ad72 /tests/result.test
parent68919c24042c4dd2b585f557d98d6bea70fa1cf4 (diff)
downloadtcl-0ce2a2cb2fb98447e3060196f2415dd267330e0d.zip
tcl-0ce2a2cb2fb98447e3060196f2415dd267330e0d.tar.gz
tcl-0ce2a2cb2fb98447e3060196f2415dd267330e0d.tar.bz2
* generic/tclBasic.c: Added interp flag value ERR_LEGACY_COPY to
* generic/tclInt.h: control the timing with which the global * generic/tclNamesp.c: variables ::errorCode and ::errorInfo get * generic/tclProc.c: updated after an error. This keeps more * generic/tclResult.c: precise compatibility with Tcl 8.4. * tests/result.test (result-6.2): [Bug 1649062]
Diffstat (limited to 'tests/result.test')
-rw-r--r--tests/result.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/result.test b/tests/result.test
index fa21bf7..cefcaed 100644
--- a/tests/result.test
+++ b/tests/result.test
@@ -114,7 +114,25 @@ test result-6.1 {Bug 1209759} -constraints testreturn -body {
# Might panic if bug is not fixed.
proc foo {} {catch {return -level 2}; testreturn}
foo
+} -cleanup {
+ rename foo {}
} -returnCodes ok -result {}
+test result-6.2 {Bug 1649062} -setup {
+ proc foo {} {
+ if {[catch {
+ return -code error -errorinfo custom -errorcode CUSTOM foo
+ } err]} {
+ return [list $err $::errorCode $::errorInfo]
+ }
+ }
+ set ::errorInfo {}
+ set ::errorCode {}
+} -body {
+ foo
+} -cleanup {
+ rename foo {}
+} -result {foo {} {}}
+
# cleanup
cleanupTests