ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-Fork/t/03_new.t
(Generate patch)

Comparing AnyEvent-Fork/t/03_new.t (file contents):
Revision 1.1 by root, Thu Apr 4 00:27:06 2013 UTC vs.
Revision 1.3 by root, Thu Apr 4 03:45:13 2013 UTC

1BEGIN { $| = 1; print "1..8\n"; } 1BEGIN { $| = 1; print "1..9\n"; }
2 2
3use AnyEvent::Fork; 3use AnyEvent::Fork;
4 4
5print "ok 1\n"; 5print "ok 1\n";
6 6
12 12
13use AnyEvent::Util; 13use AnyEvent::Util;
14print +(my ($r, $w) = AnyEvent::Util::portable_pipe) ? "" : "not ", "ok 5\n"; 14print +(my ($r, $w) = AnyEvent::Util::portable_pipe) ? "" : "not ", "ok 5\n";
15 15
16$proc->send_fh ($w); 16$proc->send_fh ($w);
17$proc->_cmd (e => 'syswrite $arg[0], "173\n"'); 17$proc->eval ('syswrite $arg[0], "173"');
18undef $w;
19
18{ my $w = AE::io $r, 0, my $cv = AE::cv; $cv->recv } 20{ my $w = AE::io $r, 0, my $cv = AE::cv; $cv->recv }
19 21
20print "ok 6\n"; 22print "ok 6\n";
21 23
22print <$r> eq "173\n" ? "" : "not ", "ok 7\n"; 24undef $proc;
23 25
24print "ok 8\n"; 26print "ok 7\n";
27
28$r = <$r>;
29print $r eq "173" ? "" : "not ", "ok 8 # $r\n";
30
31print "ok 9\n";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines