test close handler
[scpubgit/TenDotTcl.git] / t / readch.t
index c10189a..ed7513b 100644 (file)
@@ -2,7 +2,7 @@ BEGIN { exec(tclsh => 't/tcl/harness.tcl' => $0) }
 
 package require ten
 
-set tfh [open {|./echo.pl} r+]
+set tfh [open {|t/bin/echo.pl} r+]
 
 fconfigure $tfh -buffering line
 
@@ -29,10 +29,12 @@ vwait got_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