File: 01_basic.t

package info (click to toggle)
libproc-fastspawn-perl 1.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 96 kB
  • sloc: perl: 20; makefile: 3
file content (19 lines) | stat: -rw-r--r-- 477 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
BEGIN { $| = 1; print "1..9\n"; }

use Proc::FastSpawn;

print "ok 1\n";

my $pid = spawn $^X, ["perl", "-e", "exit 5"];
print $pid ? "" : "not ", "ok 2\n";
print +($pid == waitpid $pid, 0) ? "" : "not ", "ok 3\n";
print $? == 0x0500 ? "" : "not ", "ok 4\n";

print "ok 5\n";

$pid = spawnp $^X, ["perl", "-e", "exit 6"];
print $pid ? "" : "not ", "ok 6\n";
print +($pid == waitpid $pid, 0) ? "" : "not ", "ok 7\n";
print $? == 0x0600 ? "" : "not ", "ok 8\n";

print "ok 9\n";