ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-Fork/t/03_new.t
Revision: 1.1
Committed: Thu Apr 4 00:27:06 2013 UTC (11 years, 2 months ago) by root
Content type: application/x-troff
Branch: MAIN
Log Message:
*** empty log message ***

File Contents

# Content
1 BEGIN { $| = 1; print "1..8\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->_cmd (e => 'syswrite $arg[0], "173\n"');
18 { my $w = AE::io $r, 0, my $cv = AE::cv; $cv->recv }
19
20 print "ok 6\n";
21
22 print <$r> eq "173\n" ? "" : "not ", "ok 7\n";
23
24 print "ok 8\n";