1 BEGIN { exec(tclsh => 't/tcl/harness.tcl' => $0) }
5 set tfh [open {|t/bin/echo.pl} r+]
7 fconfigure $tfh -buffering line
9 set rch [ten::read_channel %AUTO% -fh $tfh]
18 $rch configure -on_line_call line_cb
24 is $got_line foo "Got line from read channel (send before set cb)"
30 is $got_line bar "Got line from read channel (send after set cb)"
32 $rch configure -on_close_call {global got_line; set got_line bye}
38 is $got_line bye "Close handler called"