diff options
author | dgp <dgp@users.sourceforge.net> | 2009-09-28 18:02:19 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2009-09-28 18:02:19 (GMT) |
commit | 9ed15c4edf59c0dda55797c0debad69464c092c0 (patch) | |
tree | 77501ad53b79c0b3566c388189c1a3aa07c74d60 /tests/error.test | |
parent | bf83bf5f46a2ec5105fac6f5a25b43535dcac49f (diff) | |
download | tcl-9ed15c4edf59c0dda55797c0debad69464c092c0.zip tcl-9ed15c4edf59c0dda55797c0debad69464c092c0.tar.gz tcl-9ed15c4edf59c0dda55797c0debad69464c092c0.tar.bz2 |
* generic/tclCmdMZ.c: Replaced TclProcessReturn() calls with
* tests/error.test: Tcl_SetReturnOptions() calls as a simple fix
for [Bug 2855247]. Thanks to Anton Kovalenko for the report and fix.
Additional fixes for other failures demonstrated by new tests.
Diffstat (limited to 'tests/error.test')
-rw-r--r-- | tests/error.test | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/error.test b/tests/error.test index 3106ca9..e18afad 100644 --- a/tests/error.test +++ b/tests/error.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: error.test,v 1.21 2009/09/28 16:34:40 dgp Exp $ +# RCS: @(#) $Id: error.test,v 1.22 2009/09/28 18:02:20 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -495,6 +495,7 @@ foreach level {0 1 2 3} { foreach code {0 1 2 3 4 5} { # Following cases have different -errorinfo; avoid false alarms + # TODO: examine whether these difference are as they ought to be. if {$level == 0 && $code == 1} continue foreach extras {{} {-bar soom}} { @@ -503,6 +504,8 @@ test error-15.8.$level.$code.[llength $extras] {[try] coverage} { set script {return -level $level -code $code {*}$extras foo} catch $script m1 o1 catch {try $script} m2 o2 + set o1 [lsort -stride 2 $o1] + set o2 [lsort -stride 2 $o2] expr {$o1 eq $o2 ? "ok" : "$o1\n\tis not equal to\n$o2"} } ok @@ -510,6 +513,17 @@ test error-15.9.$level.$code.[llength $extras] {[try] coverage} { set script {return -level $level -code $code {*}$extras foo} catch $script m1 o1 catch {try $script finally {}} m2 o2 + set o1 [lsort -stride 2 $o1] + set o2 [lsort -stride 2 $o2] + expr {$o1 eq $o2 ? "ok" : "$o1\n\tis not equal to\n$o2"} +} ok + +test error-15.10.$level.$code.[llength $extras] {[try] coverage} { + set script {return -level $level -code $code {*}$extras foo} + catch $script m1 o1 + catch {try $script on $code {x y} {return -options $y $x}} m2 o2 + set o1 [lsort -stride 2 $o1] + set o2 [lsort -stride 2 $o2] expr {$o1 eq $o2 ? "ok" : "$o1\n\tis not equal to\n$o2"} } ok |