summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/cpan/Test-Simple/t/Legacy/fork.t
blob: 134f7a18590694b30470db0c137fa0b8b7886eb8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/perl -w
use strict;
use warnings;

use Test2::Util qw/CAN_FORK/;
BEGIN {
    unless(CAN_FORK) {
        require Test::More;
        Test::More->import(skip_all => "fork is not supported");
    }
}

BEGIN {
    if( $ENV{PERL_CORE} ) {
        chdir 't';
        @INC = '../lib';
    }
}

use Test::More;
plan tests => 1;

if( fork ) { # parent
    pass("Only the parent should process the ending, not the child");
}
else {
    exit;   # child
}