File: tkt-84be1b5a73.test

package info (click to toggle)
tclthread 1%3A2.8.8-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,800 kB
  • sloc: ansic: 8,311; tcl: 1,710; sh: 393; makefile: 81
file content (25 lines) | stat: -rw-r--r-- 567 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package require tcltest
namespace import ::tcltest::*
tcltest::loadTestedCommands
package require Thread

# This test used to segfault before commit f4c95731c0.
test tkt-84be1b5a73 {Ticket 84be1b5a73} -body {
    set t [thread::create]
    set resultvar() {}

    trace add variable resultvar() write {
        unset -nocomplain resultvar()
        list}

    proc errorproc {tid einfo} {}
    thread::errorproc errorproc
    thread::send -async $t {
        error ""
    } resultvar()

    after 1000 {
        set forever 1
    }
    vwait forever
} -returnCodes 0