6 unless ($^O eq "cygwin") {
7 print "1..0 # skipped: cygwin specific test\n";
12 use Test::More tests => 4;
14 is(Cygwin::winpid_to_pid(Cygwin::pid_to_winpid($$)), $$,
15 "perl pid translates to itself");
19 skip "test not run from cygwin process", 1 if $parent <= 1;
20 is(Cygwin::winpid_to_pid(Cygwin::pid_to_winpid($parent)), $parent,
21 "parent pid translates to itself");
24 my $catpid = open my $cat, "|cat" or die "Couldn't cat: $!";
25 open my $ps, "ps|" or die "Couldn't do ps: $!";
26 my ($catwinpid) = map /^.\s+$catpid\s+\d+\s+\d+\s+(\d+)/, <$ps>;
29 is(Cygwin::winpid_to_pid($catwinpid), $catpid, "winpid to pid");
30 is(Cygwin::pid_to_winpid($catpid), $catwinpid, "pid to winpid");