diff options
author | dgp <dgp@users.sourceforge.net> | 2004-10-26 20:14:12 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2004-10-26 20:14:12 (GMT) |
commit | 02d8d08520b48fae236b2c0073b0d3e4fcc61845 (patch) | |
tree | d434a0b7fcce12b2effd71b0d201f00fc9b516ca /tests/error.test | |
parent | 52d8c7176f0f89ff442c950f4dea8584f15014e3 (diff) | |
download | tcl-02d8d08520b48fae236b2c0073b0d3e4fcc61845.zip tcl-02d8d08520b48fae236b2c0073b0d3e4fcc61845.tar.gz tcl-02d8d08520b48fae236b2c0073b0d3e4fcc61845.tar.bz2 |
* tests/compile.test (compile-12.4): Backport test for Bug 1001997.
* tests/timer.test (timer-10.1): Backport test for Bug 1016167.
* tests/tcltest.test (tcltest-12.3,4): Backport setup corrections.
* tests/error.test (error-6.3,4,7,9): Backport of some tests.
* tests/basic.test (basic-49.*):
* tests/namespace.test (namespace-8.7):
* tests/init.test (init-2.8): Updated to not rely on http package.
* generic/tclThreadTest.c (ThreadEventProc): Corrected subtle
bug where the returned (char *) from Tcl_GetStringResult(interp)
continued to be used without copying or refcounting, while
activity on the interp continued.
Diffstat (limited to 'tests/error.test')
-rw-r--r-- | tests/error.test | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/error.test b/tests/error.test index 1d5f9a0..737faa4 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.9 2002/01/29 03:03:02 hobbs Exp $ +# RCS: @(#) $Id: error.test,v 1.9.2.1 2004/10/26 20:14:36 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -176,6 +176,30 @@ 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.3 {catch must reset error state} { + set errorCode BUG + catch {error outer [catch set]} + list $errorCode $errorInfo +} {NONE 1} +test error-6.4 {catch must reset error state} { + catch {error [catch {error foo bar baz}] 1} + list $errorCode $errorInfo +} {NONE 1} +test error-6.7 {catch must reset error state} { + proc foo {} { + return -code error -errorinfo [catch {error foo bar baz}] + } + catch foo + list $errorCode +} {NONE} +test error-6.9 {catch must reset error state} { + proc foo {} { + return -code error [catch {error foo bar baz}] + } + catch foo + list $errorCode +} {NONE} + # cleanup catch {rename p ""} |