File: fork.t

package info (click to toggle)
libtest-fork-perl 0.02-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 84 kB
  • sloc: perl: 135; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 392 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/perl -w

use Test::More tests => 10;

my $Parent = $$;

use_ok 'Test::Fork';

fork_ok(2, sub{ 
    pass("child 1");
    pass("child 1 again");
});

pass("parent one");

fork_ok(2, sub { 
    pass("child 2");
    pass("child 2 again");
});

pass("parent two");

1 while Test::Fork::_reaper();
ok( Test::More->builder->use_numbers, "use_numbers back on after all children reaped" );