summaryrefslogtreecommitdiffstats
path: root/tests/nre.test
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2010-01-21 17:23:49 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2010-01-21 17:23:49 (GMT)
commit81ddbd4ea03baa8e607252b67b96e72038fd5c57 (patch)
tree9adf2b51c518fd83970c7611821260f56d8b6d98 /tests/nre.test
parent1549d82a2029add6f62dde489d26a70b466f4fd0 (diff)
downloadtcl-81ddbd4ea03baa8e607252b67b96e72038fd5c57.zip
tcl-81ddbd4ea03baa8e607252b67b96e72038fd5c57.tar.gz
tcl-81ddbd4ea03baa8e607252b67b96e72038fd5c57.tar.bz2
* generic/tclCompile.h: NRE-enable direct eval on BC spoilage
* generic/tclExecute.c: [Bug 2910748] * tests/nre.test:
Diffstat (limited to 'tests/nre.test')
-rw-r--r--tests/nre.test24
1 files changed, 23 insertions, 1 deletions
diff --git a/tests/nre.test b/tests/nre.test
index 2c91e7a..dcc2180 100644
--- a/tests/nre.test
+++ b/tests/nre.test
@@ -9,7 +9,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.11 2009/06/25 19:24:16 dgp Exp $
+# RCS: @(#) $Id: nre.test,v 1.12 2010/01/21 17:23:49 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -280,6 +280,28 @@ test nre-7.7 {[eval] is not recursive} -setup {
testnrelevels
} -result {{0 2 2 1} 0}
+test nre-7.8 {bug #2910748: switch out of stale BC is not nre-aware} -setup {
+ proc foo args {}
+ foo
+ coroutine bar apply {{} {
+ yield
+ proc foo args {return ok}
+ while 1 {
+ yield [incr i]
+ foo
+ }
+ }}
+} -body {
+ # if switching to plain eval is not nre aware, this will cause a "cannot
+ # yield" error
+
+ list [bar] [bar] [bar]
+} -cleanup {
+ rename bar {}
+ rename foo {}
+} -result {1 2 3}
+
+
test nre-8.1 {nre and {*}} -body {
# force an expansion that grows the evaluation stack, check that nre
# adapts the bottomPtr. This crashes on failure.