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)"
-done_testing
+$rch configure -on_close_call {global got_line; set got_line bye}
+
+puts $tfh DIE
+
+vwait got_line
+
+is $got_line bye "Close handler called"
+done_testing