summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2008-07-31 15:42:06 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2008-07-31 15:42:06 (GMT)
commitcad03f83809878b3802167f7b8cd219012690cc8 (patch)
treec1cd6fe19b292b68cd8a7fb589a5d7753ab2367f /tests
parent0a80549aa57439939e05b98b8471c00b2af09b49 (diff)
downloadtcl-cad03f83809878b3802167f7b8cd219012690cc8.zip
tcl-cad03f83809878b3802167f7b8cd219012690cc8.tar.gz
tcl-cad03f83809878b3802167f7b8cd219012690cc8.tar.bz2
* generic/tclBasic.c: NR-enabling [catch]
* generic/tclCmdAH.c: * generic/tclInt.h: * tests/NRE.test:
Diffstat (limited to 'tests')
-rw-r--r--tests/NRE.test19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/NRE.test b/tests/NRE.test
index b80eed8..dfa6f59 100644
--- a/tests/NRE.test
+++ b/tests/NRE.test
@@ -8,7 +8,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: NRE.test,v 1.8 2008/07/31 03:42:17 msofer Exp $
+# RCS: @(#) $Id: NRE.test,v 1.9 2008/07/31 15:42:08 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -285,6 +285,23 @@ test NRE-6.2 {[uplevel] is not recursive} -setup {
rename a {}
} -result {0 20001}
+test NRE-7.1 {[catch] is not recursive} -setup {
+ proc a i {
+ variable x [depthDiff]
+ if {[incr i] > 10} {
+ return
+ }
+ uplevel 1 [list catch "a $i"]
+ }
+} -body {
+ catch {a 0}
+ lrange $x 0 3
+} -cleanup {
+ rename a {}
+ unset x
+} -result {0 3 3 0}
+
+
#
# Basic TclOO tests
#