diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2008-08-21 23:57:41 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2008-08-21 23:57:41 (GMT) |
commit | c81af542ef2037176d7f71f883aa3e93dfc4196b (patch) | |
tree | cda129ecc3b3ff0b8e2b9b4b241ae31614de5556 /tests | |
parent | edfda9078ba74cdc4c6038b014e610f7b6efcc96 (diff) | |
download | tcl-c81af542ef2037176d7f71f883aa3e93dfc4196b.zip tcl-c81af542ef2037176d7f71f883aa3e93dfc4196b.tar.gz tcl-c81af542ef2037176d7f71f883aa3e93dfc4196b.tar.bz2 |
* generic/tclBasic.c: Previous fix, now done right.
* generic/tclCmdIL.c:
* generic/tclInt.h:
* tests/unsupported.test:
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unsupported.test | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/tests/unsupported.test b/tests/unsupported.test index 48cd130..87db81d 100644 --- a/tests/unsupported.test +++ b/tests/unsupported.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: unsupported.test,v 1.4 2008/08/17 19:37:13 msofer Exp $ +# RCS: @(#) $Id: unsupported.test,v 1.5 2008/08/21 23:57:43 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -717,6 +717,34 @@ test unsupported-C.2.6 {deletion of running coroutine} -constraints {coroutine} list [foo] [catch foo msg] $msg } -result {1 1 {invalid command name "foo"}} +test unsupported-C.3.1 {info level computation} -constraints {coroutine} \ +-setup { + proc a {} {while 1 {yield [info level]}} + proc b {} foo +} -body { + # note that coroutines execute in uplevel #0 + set l0 [coroutine foo a] + set l1 [foo] + set l2 [b] + list $l0 $l1 $l2 +} -cleanup { + rename a {} + rename b {} +} -result {1 1 1} + +test unsupported-C.3.2 {info frame computation} -constraints {coroutine} \ +-setup { + proc a {} {while 1 {yield [info frame]}} + proc b {} foo +} -body { + set l0 [coroutine foo a] + set l1 [foo] + set l2 [b] + expr {$l2 - $l1} +} -cleanup { + rename a {} + rename b {} +} -result 1 # cleanup |