From 7748093580be5cc1b4af1f763d92c72e1b71472f Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Fri, 26 Apr 2024 17:02:05 +0000 Subject: Fix test for [9a8ce8af3d] --- tests/io.test | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/tests/io.test b/tests/io.test index 5c0e5aa..2ed97d2 100644 --- a/tests/io.test +++ b/tests/io.test @@ -2479,13 +2479,25 @@ test io-28.6 { Should not produce a segmentation fault in a Tcl built with --enable-symbols and -DPURIFY -} debugpurify { +} -body { variable done variable res after 0 [list coroutine c1 apply [list {} { variable done - set chan [chan create w {apply {args { - list initialize finalize watch write configure blocking + set chan [chan create w {apply {{cmd chan args} { + switch $cmd { + blocking - finalize { + } + watch { + chan postevent $chan write + } + initialize { + list initialize finalize watch read write configure blocking + } + default { + error [list {unexpected command} $cmd] + } + } }}}] chan configure $chan -blocking 0 while 1 { @@ -2497,16 +2509,15 @@ test io-28.6 { } } [namespace current]]] vwait [namespace current]::done -return success -} success - + return success +} -result success test io-28.7 { close channel in read event handler Should not produce a segmentation fault in a Tcl built with --enable-symbols and -DPURIFY -} debugpurify { +} -body { variable done variable res after 0 [list coroutine c1 apply [list {} { @@ -2536,10 +2547,8 @@ test io-28.7 { } } [namespace current]]] vwait [namespace current]::done -return success -} success - - + return success +} -result success test io-29.1 {Tcl_WriteChars, channel not writable} { list [catch {puts stdin hello} msg] $msg -- cgit v0.12