ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-Fork/t/03_new.t
Revision: 1.3
Committed: Thu Apr 4 03:45:13 2013 UTC (11 years, 2 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-1_1, rel-1_0, rel-1_3, rel-1_2, rel-0_2, rel-0_5, rel-0_6, rel-0_7, rel-0_01, rel-1_32, rel-1_31, HEAD
Changes since 1.2: +11 -5 lines
Log Message:
*** empty log message ***

File Contents

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