Upgrade to Test-Simple-0.82.
[p5sagit/p5-mst-13.2.git] / lib / Test / Simple / t / fork.t
1 #!/usr/bin/perl -w
2 # $Id: /mirror/googlecode/test-more/t/fork.t 57943 2008-08-18T02:09:22.275428Z brooklyn.kid51  $
3
4 BEGIN {
5     if( $ENV{PERL_CORE} ) {
6         chdir 't';
7         @INC = '../lib';
8     }
9 }
10
11 use Test::More;
12 use Config;
13
14 my $Can_Fork = $Config{d_fork} ||
15                (($^O eq 'MSWin32' || $^O eq 'NetWare') and
16                 $Config{useithreads} and 
17                 $Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/
18                );
19
20 if( !$Can_Fork ) {
21     plan skip_all => "This system cannot fork";
22 }
23 else {
24     plan tests => 1;
25 }
26
27 if( fork ) { # parent
28     pass("Only the parent should process the ending, not the child");
29 }
30 else {
31     exit;   # child
32 }
33