summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-05-19 22:22:04 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-05-19 22:22:04 (GMT)
commitceb71f9e1a655bd89eaf50c944528c49fe812f88 (patch)
tree09d4fe536d5f2387ba3c75f463d55d1277217efd /tests
parenta84414976b66cd9401a968f794feffd0bd8c9f79 (diff)
downloadtcl-ceb71f9e1a655bd89eaf50c944528c49fe812f88.zip
tcl-ceb71f9e1a655bd89eaf50c944528c49fe812f88.tar.gz
tcl-ceb71f9e1a655bd89eaf50c944528c49fe812f88.tar.bz2
Added test based on suggestion by Miguel Sofer
Diffstat (limited to 'tests')
-rw-r--r--tests/interp.test18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/interp.test b/tests/interp.test
index 6313780..a26ab90 100644
--- a/tests/interp.test
+++ b/tests/interp.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: interp.test,v 1.34 2004/05/19 21:56:37 dkf Exp $
+# RCS: @(#) $Id: interp.test,v 1.35 2004/05/19 22:22:04 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2.1
@@ -2913,6 +2913,22 @@ test interp-34.3 {basic test of limits - pure bytecode loop} -body {
} -returnCodes error -result {time limit exceeded} -cleanup {
interp delete $i
}
+test interp-34.3.1 {basic test of limits - pure bytecode loop} -body {
+ set i [interp create]
+ $i eval {
+ proc foobar {} {
+ set while while
+ $while {1} {
+ # No bytecode at all here...
+ }
+ }
+ }
+ # We use a time limit here; command limits don't trap this case
+ $i limit time -seconds [expr {[clock seconds]+2}]
+ $i eval foobar
+} -returnCodes error -result {time limit exceeded} -cleanup {
+ interp delete $i
+}
test interp-34.4 {limits with callbacks: extending limits} -setup {
set i [interp create]
set a 0