ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/AnyEvent-Fork-Remote/t/01_basic.t
Revision: 1.1
Committed: Sun Apr 28 15:36:30 2013 UTC (13 years, 4 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-1_0, rel-0_2, HEAD
Log Message:
0.2

File Contents

# User Rev Content
1 root 1.1 BEGIN { $| = 1; print "1..4\n"; }
2    
3     use AnyEvent::Util;
4     use AnyEvent::Fork::Remote;
5     use Proc::FastSpawn;
6    
7     print "ok 1\n";
8    
9     my $fork = new_exec AnyEvent::Fork::Remote $^X, "perl";
10    
11     print "ok 2\n";
12    
13     $fork->eval ('sub prr { syswrite STDOUT, "ok 3\n"; exit }');
14    
15     $fork->run ("prr", my $cv = AE::cv);
16     $fh = $cv->recv;
17    
18     AnyEvent::Util::fh_nonblocking $fh, 0;
19    
20     print <$fh>;
21    
22     print "ok 4\n";
23