summaryrefslogtreecommitdiffstats
path: root/tests/switch.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/switch.test')
-rw-r--r--tests/switch.test18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/switch.test b/tests/switch.test
index 2652a70..738565f 100644
--- a/tests/switch.test
+++ b/tests/switch.test
@@ -11,7 +11,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: switch.test,v 1.24 2009/06/24 15:17:41 dgp Exp $
+# RCS: @(#) $Id: switch.test,v 1.25 2009/07/14 16:52:28 kennykb Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -738,6 +738,22 @@ test switch-14.16 {switch -regexp compilation} {
}}
} no
+test switch-15.1 {coroutine safety of non-bytecoded switch} {*}{
+ -body {
+ proc coro {} {
+ switch -glob a {
+ a {yield ok1}
+ }
+ return ok2
+ }
+ list [coroutine c coro] [c]
+ }
+ -result {ok1 ok2}
+ -cleanup {
+ rename coro {}
+ }
+}
+
# cleanup
catch {rename foo {}}
::tcltest::cleanupTests