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