summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2008-08-26 22:36:52 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2008-08-26 22:36:52 (GMT)
commit15df1bf8a56a5077d263e50e009536d98d13ad19 (patch)
tree0d7bc4e10367dd2cbb39be3e40de32df3e6ff0c6 /tests
parentdc5e0c1a99d04f059e8399531b03ebe9654edd8f (diff)
downloadtcl-15df1bf8a56a5077d263e50e009536d98d13ad19.zip
tcl-15df1bf8a56a5077d263e50e009536d98d13ad19.tar.gz
tcl-15df1bf8a56a5077d263e50e009536d98d13ad19.tar.bz2
* generic/tclBasic.c (InfoCoroutine):
* tests/unsupported.test: new command that returns the FQN of the currently executing coroutine. Lives as infoCoroutine under unsupported, but is designed to become a subcommand of [info]
Diffstat (limited to 'tests')
-rw-r--r--tests/unsupported.test24
1 files changed, 23 insertions, 1 deletions
diff --git a/tests/unsupported.test b/tests/unsupported.test
index 94242fa..0267c58 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.6 2008/08/22 18:27:27 dgp Exp $
+# RCS: @(#) $Id: unsupported.test,v 1.7 2008/08/26 22:37:05 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -746,6 +746,28 @@ test unsupported-C.3.2 {info frame computation} -constraints {coroutine} \
rename b {}
} -result 1
+test unsupported-C.3.3 {info coroutine} -constraints {coroutine} \
+-setup {
+ proc a {} {infoCoroutine}
+ proc b {} a
+} -body {
+ b
+} -cleanup {
+ rename a {}
+ rename b {}
+} -result {}
+
+test unsupported-C.3.4 {info coroutine} -constraints {coroutine} \
+-setup {
+ proc a {} {infoCoroutine}
+ proc b {} a
+} -body {
+ coroutine foo b
+} -cleanup {
+ rename a {}
+ rename b {}
+} -result ::foo
+
# cleanup
::tcltest::cleanupTests