Tcl Source Code

Check-in [d321b807d3]
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:Suggested fix for [60559fd4a6]: put selected tests in child interps
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-60559fd4a6
Files: files | file ages | folders
SHA3-256: d321b807d3f80b1d3517ff36769a9252abd8fad2bb67774f97c628962a92f1cf
User & Date: dkf 2019-04-11 21:39:50
Context
2019-04-17
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
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
09:52
merge 8.6 (conflicts resolved, changes on tests/cmdMZ.test in [4cb9044dfa] reverted - timerate is su... check-in: 1803c5e40f user: sebres tags: core-8-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tests/coroutine.test.

622
623
624
625
626
627
628
629




630
631
632
633
634





635

636
637


638

639
640
641
642
643
644
645
646
647
648
...
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
test coroutine-7.5 {return codes} {
    set result {}
    foreach code {0 1 2 3 4 5} {
	lappend result [catch {coroutine demo return -level 0 -code $code}]
    }
    set result
} {0 1 2 3 4 5}
test coroutine-7.6 {Early yield crashes} {




    proc foo args {}
    trace add execution foo enter {catch yield}
    coroutine demo foo
    rename foo {}
} {}





test coroutine-7.7 {Bug 2486550} -setup {

    interp hide {} yield
} -body {


    coroutine demo interp invokehidden {} yield ok

} -cleanup {
    demo
    interp expose {} yield
} -result ok
test coroutine-7.8 {yieldto context nuke: Bug a90d9331bc} -setup {
    namespace eval cotest {}
    set ::result ""
} -body {
    proc cotest::body {} {
	lappend ::result a
................................................................................
    }
    slave eval demo
    set result [slave eval {set ::result}]

    interp delete slave
    set result
} -result {inject-executed}


 
# cleanup
unset lambda
::tcltest::cleanupTests

return

# Local Variables:
# mode: tcl
# End:






|
>
>
>
>
|
|
|
|
<
>
>
>
>
>

>
|

>
>
|
>

|
|







 







<
<










622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637

638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
...
788
789
790
791
792
793
794


795
796
797
798
799
800
801
802
803
804
test coroutine-7.5 {return codes} {
    set result {}
    foreach code {0 1 2 3 4 5} {
	lappend result [catch {coroutine demo return -level 0 -code $code}]
    }
    set result
} {0 1 2 3 4 5}
test coroutine-7.6 {Early yield crashes} -setup {
    set i [interp create]
} -body {
    # Force into a child interpreter [bug 60559fd4a6]
    $i eval {
	proc foo args {}
	trace add execution foo enter {catch yield}
	coroutine demo foo
	rename foo {}

	return ok
    }
} -cleanup {
    interp delete $i
} -result ok
test coroutine-7.7 {Bug 2486550} -setup {
    set i [interp create]
    $i hide yield
} -body {
    # Force into a child interpreter [bug 60559fd4a6]
    $i eval {
	coroutine demo interp invokehidden {} yield ok
    }
} -cleanup {
    $i eval demo
    interp delete $i
} -result ok
test coroutine-7.8 {yieldto context nuke: Bug a90d9331bc} -setup {
    namespace eval cotest {}
    set ::result ""
} -body {
    proc cotest::body {} {
	lappend ::result a
................................................................................
    }
    slave eval demo
    set result [slave eval {set ::result}]

    interp delete slave
    set result
} -result {inject-executed}


 
# cleanup
unset lambda
::tcltest::cleanupTests

return

# Local Variables:
# mode: tcl
# End: