ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Proc-FastSpawn/t/01_basic.t
Revision: 1.2
Committed: Sun Apr 28 00:49:43 2013 UTC (13 years, 5 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-1_1, rel-1_2, HEAD
Changes since 1.1: +10 -1 lines
Log Message:
1.1

File Contents

# User Rev Content
1 root 1.2 BEGIN { $| = 1; print "1..9\n"; }
2 root 1.1
3     use Proc::FastSpawn;
4    
5     print "ok 1\n";
6 root 1.2
7 root 1.1 my $pid = spawn $^X, ["perl", "-e", "exit 5"];
8     print $pid ? "" : "not ", "ok 2\n";
9     print +($pid == waitpid $pid, 0) ? "" : "not ", "ok 3\n";
10     print $? == 0x0500 ? "" : "not ", "ok 4\n";
11 root 1.2
12 root 1.1 print "ok 5\n";
13 root 1.2
14     $pid = spawnp $^X, ["perl", "-e", "exit 6"];
15     print $pid ? "" : "not ", "ok 6\n";
16     print +($pid == waitpid $pid, 0) ? "" : "not ", "ok 7\n";
17     print $? == 0x0600 ? "" : "not ", "ok 8\n";
18    
19     print "ok 9\n";