--- AnyEvent/t/handle/01_readline.t 2008/05/21 14:37:55 1.5 +++ AnyEvent/t/handle/01_readline.t 2008/05/24 23:10:18 1.6 @@ -4,7 +4,7 @@ use AnyEvent::Impl::Perl; use AnyEvent::Handle; -use Test::More tests => 3; +use Test::More tests => 4; use Socket; { @@ -47,7 +47,7 @@ fh => $rd, on_eof => sub { $cv->broadcast }, on_read => sub { - $_[0]->push_read_line (sub { + $_[0]->push_read (line => sub { $concat .= "$_[1]:"; }); } @@ -55,10 +55,15 @@ my $wr_ae = new AnyEvent::Handle fh => $wr, on_eof => sub { die }; + $wr_ae->push_write (netstring => "0:xx,,"); $wr_ae->push_write ("A\nBC\nDEF\nG\n" . ("X" x 113) . "\n"); undef $wr; undef $wr_ae; + $rd_ae->push_read (netstring => sub { + is ($_[1], "0:xx,,"); + }); + $cv->wait; is ($concat, "A:BC:DEF:G:" . ("X" x 113) . ":", 'second lines were read correctly');