package require ten
-set tfh [open {|./echo.pl} r+]
+set tfh [open {|t/bin/echo.pl} r+]
fconfigure $tfh -buffering line
is $got_line bar "Got line from read channel (send after set cb)"
-#$rch configure -on_close_call {global got_line; set got_line bye}
+$rch configure -on_close_call {global got_line; set got_line bye}
-#vwait got_line
+puts $tfh DIE
-#is $got_line bye "Close handler called"
+vwait got_line
+
+is $got_line bye "Close handler called"
done_testing