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.12 by root, Thu Aug 21 23:48:35 2008 UTC vs.
Revision 1.14 by root, Fri Aug 26 03:34:01 2011 UTC

2 2
3# actually tests a few other read/write types as well 3# actually tests a few other read/write types as well
4 4
5use strict; 5use strict;
6 6
7use AnyEvent::Impl::Perl; 7use AnyEvent;
8BEGIN { require AnyEvent::Impl::Perl unless $ENV{PERL_ANYEVENT_MODEL} }
8use AnyEvent::Handle; 9use AnyEvent::Handle;
10use AnyEvent::Util;
9use Test::More tests => 8; 11use Test::More tests => 8;
10use Socket; 12use Socket;
11use Errno; 13use Errno;
12 14
13{ 15{
14 my $cv = AnyEvent->condvar; 16 my $cv = AnyEvent->condvar;
15 17
16 socketpair my $rd, my $wr, AF_UNIX, SOCK_STREAM, PF_UNSPEC; 18 my ($rd, $wr) = portable_socketpair;
17 19
18 my $rd_ae = AnyEvent::Handle->new ( 20 my $rd_ae = AnyEvent::Handle->new (
19 fh => $rd, 21 fh => $rd,
20 on_error => sub { 22 on_error => sub {
21 ok ($! == &Errno::EPIPE); 23 ok ($! == &Errno::EPIPE);
45} 47}
46 48
47{ 49{
48 my $cv = AnyEvent->condvar; 50 my $cv = AnyEvent->condvar;
49 51
50 socketpair my $rd, my $wr, AF_UNIX, SOCK_STREAM, PF_UNSPEC; 52 my ($rd, $wr) = portable_socketpair;
51 53
52 my $concat; 54 my $concat;
53 55
54 my $rd_ae = 56 my $rd_ae =
55 AnyEvent::Handle->new ( 57 AnyEvent::Handle->new (

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines