Tcl Source Code

Check-in [30b5977b56]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Revise coroutines tests so they do not leave behind frame footprints that can interfere with other tests.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-6-branch
Files: files | file ages | folders
SHA3-256: 30b5977b5664dc4e21617287cb9dff7e25134445000f4bee22549c9f8970ac3c
User & Date: dgp 2019-04-17 14:34:42
Context
2019-04-17
20:00
merge 8.5 check-in: eaafb5917f user: sebres tags: core-8-6-branch
15:08
[60559fd4a6] Test more robust against frame contexts of testing environment. check-in: 1b2cf8fff3 user: dgp tags: core-8-branch
14:34
Revise coroutines tests so they do not leave behind frame footprints that can interfere with other t... check-in: 30b5977b56 user: dgp tags: core-8-6-branch
14:28
Isolate tests of [info frame] results from testing environment. check-in: 572f113bbb user: dgp tags: core-8-6-branch
2019-04-11
21:39
Suggested fix for [60559fd4a6]: put selected tests in child interps Closed-Leaf check-in: d321b807d3 user: dkf tags: bug-60559fd4a6
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to tests/coroutine.test.

   622    622   test coroutine-7.5 {return codes} {
   623    623       set result {}
   624    624       foreach code {0 1 2 3 4 5} {
   625    625   	lappend result [catch {coroutine demo return -level 0 -code $code}]
   626    626       }
   627    627       set result
   628    628   } {0 1 2 3 4 5}
   629         -test coroutine-7.6 {Early yield crashes} {
   630         -    proc foo args {}
   631         -    trace add execution foo enter {catch yield}
   632         -    coroutine demo foo
   633         -    rename foo {}
   634         -} {}
          629  +test coroutine-7.6 {Early yield crashes} -setup {
          630  +    set i [interp create]
          631  +} -body {
          632  +    # Force into a child interpreter [bug 60559fd4a6]
          633  +    $i eval {
          634  +	proc foo args {}
          635  +	trace add execution foo enter {catch yield}
          636  +	coroutine demo foo
          637  +	rename foo {}
          638  +	return ok
          639  +    }
          640  +} -cleanup {
          641  +    interp delete $i
          642  +} -result ok
   635    643   test coroutine-7.7 {Bug 2486550} -setup {
   636         -    interp hide {} yield
          644  +    set i [interp create]
          645  +    $i hide yield
   637    646   } -body {
   638         -    coroutine demo interp invokehidden {} yield ok
          647  +    # Force into a child interpreter [bug 60559fd4a6]
          648  +    $i eval {
          649  +	coroutine demo interp invokehidden {} yield ok
          650  +    }
   639    651   } -cleanup {
   640         -    demo
   641         -    interp expose {} yield
          652  +    $i eval demo
          653  +    interp delete $i
   642    654   } -result ok
   643    655   test coroutine-7.8 {yieldto context nuke: Bug a90d9331bc} -setup {
   644    656       namespace eval cotest {}
   645    657       set ::result ""
   646    658   } -body {
   647    659       proc cotest::body {} {
   648    660   	lappend ::result a
................................................................................
   776    788       }
   777    789       slave eval demo
   778    790       set result [slave eval {set ::result}]
   779    791   
   780    792       interp delete slave
   781    793       set result
   782    794   } -result {inject-executed}
   783         -
   784         -
   785    795   
   786    796   # cleanup
   787    797   unset lambda
   788    798   ::tcltest::cleanupTests
   789    799   
   790    800   return
   791    801   
   792    802   # Local Variables:
   793    803   # mode: tcl
   794    804   # End: