ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/t/handle/01_readline.t
(Generate patch)

Comparing AnyEvent/t/handle/01_readline.t (file contents):
Revision 1.10 by root, Fri Jun 6 11:00:32 2008 UTC vs.
Revision 1.11 by root, Fri Jun 6 11:05:16 2008 UTC

1#!perl 1#!perl
2
3# actually tests a few other read/write types as well
2 4
3use strict; 5use strict;
4 6
5use AnyEvent::Impl::Perl; 7use AnyEvent::Impl::Perl;
6use AnyEvent::Handle; 8use AnyEvent::Handle;
7use Test::More tests => 8; 9use Test::More tests => 8;
8use Socket; 10use Socket;
11use Errno;
9 12
10{ 13{
11 my $cv = AnyEvent->condvar; 14 my $cv = AnyEvent->condvar;
12 15
13 socketpair my $rd, my $wr, AF_UNIX, SOCK_STREAM, PF_UNSPEC; 16 socketpair my $rd, my $wr, AF_UNIX, SOCK_STREAM, PF_UNSPEC;
14 17
15 my $rd_ae = AnyEvent::Handle->new ( 18 my $rd_ae = AnyEvent::Handle->new (
16 fh => $rd, 19 fh => $rd,
17 on_error => sub { 20 on_error => sub {
18 ok ($! == Errno::EPIPE); 21 ok ($! == &Errno::EPIPE);
19 }, 22 },
20 on_eof => sub { $cv->broadcast }, 23 on_eof => sub { $cv->broadcast },
21 ); 24 );
22 25
23 my $concat; 26 my $concat;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines