diff options
author | dgp <dgp@users.sourceforge.net> | 2004-09-20 15:52:03 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2004-09-20 15:52:03 (GMT) |
commit | fa23bf52f589e9e06c1fe10ef19f5667f1cddf9e (patch) | |
tree | 5e3dba6a5c20ffe6d2dddd953c7f77b72ae44411 /tests/error.test | |
parent | 0128966eb26542c2e43adc50bb9324bd4479bd46 (diff) | |
download | tcl-fa23bf52f589e9e06c1fe10ef19f5667f1cddf9e.zip tcl-fa23bf52f589e9e06c1fe10ef19f5667f1cddf9e.tar.gz tcl-fa23bf52f589e9e06c1fe10ef19f5667f1cddf9e.tar.bz2 |
* tests/error.test (error-6.2,3): Added more tests to verify
::errorCode setting by/after a [catch].
Diffstat (limited to 'tests/error.test')
-rw-r--r-- | tests/error.test | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/error.test b/tests/error.test index 1581f4c..3773df5 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.10 2003/05/05 20:54:52 dgp Exp $ +# RCS: @(#) $Id: error.test,v 1.11 2004/09/20 15:52:05 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -176,6 +176,15 @@ test error-6.1 {catch must reset error state} { catch {error outer [catch {error inner inner.errorInfo inner.errorCode}]} list $errorCode $errorInfo } {NONE 1} +test error-6.2 {catch must reset error state} { + catch {error outer [catch {return -level 0 -code error -errorcode BUG}]} + list $errorCode $errorInfo +} {NONE 1} +test error-6.3 {catch must reset error state} { + set errorCode BUG + catch {error outer [catch set]} + list $errorCode $errorInfo +} {NONE 1} # cleanup catch {rename p ""} |