summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/basic.test6
-rw-r--r--tests/parse.test48
2 files changed, 49 insertions, 5 deletions
diff --git a/tests/basic.test b/tests/basic.test
index aaf6a65..005b458 100644
--- a/tests/basic.test
+++ b/tests/basic.test
@@ -15,7 +15,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: basic.test,v 1.38 2005/02/11 12:15:45 msofer Exp $
+# RCS: @(#) $Id: basic.test,v 1.39 2005/03/18 15:51:00 dgp Exp $
#
package require tcltest 2
@@ -604,9 +604,7 @@ test basic-46.4 {Tcl_AllowExceptions: exception return not allowed} -setup {
} -cleanup {
removeFile BREAKtest
} -returnCodes error -match glob -result {invoked "break" outside of a loop
- while executing
-"break"
- invoked from within
+ while executing*
"foo \[set a 1] \[break]"
(file "*BREAKtest" line 2)}
diff --git a/tests/parse.test b/tests/parse.test
index 619cfdd..192e435 100644
--- a/tests/parse.test
+++ b/tests/parse.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: parse.test,v 1.19 2004/10/01 03:10:36 dgp Exp $
+# RCS: @(#) $Id: parse.test,v 1.20 2005/03/18 15:51:01 dgp Exp $
if {[catch {package require tcltest 2.0.2}]} {
puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required."
@@ -944,6 +944,52 @@ test parse-18.30 {Tcl_SubstObj, side effects} {
set a
} 1
+test parse-19.1 {Bug 1115904: recursion limit in Tcl_EvalEx} -constraints {
+ testevalex
+} -setup {
+ interp create i
+ load {} Tcltest i
+ i eval {proc {} args {}}
+ interp recursionlimit i 3
+} -body {
+ i eval {testevalex {[]}}
+} -cleanup {
+ interp delete i
+}
+
+test parse-19.2 {Bug 1115904: recursion limit in Tcl_EvalEx} -constraints {
+ testevalex
+} -setup {
+ interp create i
+ load {} Tcltest i
+ i eval {proc {} args {}}
+ interp recursionlimit i 3
+} -body {
+ i eval {testevalex {[[]]}}
+} -cleanup {
+ interp delete i
+} -returnCodes error -match glob -result {too many nested*}
+
+test parse-19.3 {Bug 1115904: recursion limit in Tcl_EvalEx} -setup {
+ interp create i
+ i eval {proc {} args {}}
+ interp recursionlimit i 3
+} -body {
+ i eval {subst {[]}}
+} -cleanup {
+ interp delete i
+}
+
+test parse-19.4 {Bug 1115904: recursion limit in Tcl_EvalEx} -setup {
+ interp create i
+ i eval {proc {} args {}}
+ interp recursionlimit i 3
+} -body {
+ i eval {subst {[[]]}}
+} -cleanup {
+ interp delete i
+} -returnCodes error -match glob -result {too many nested*}
+
cleanupTests
}