File: fork.t

package info (click to toggle)
libgd-perl 2.84-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,060 kB
  • sloc: perl: 2,693; pascal: 336; sh: 18; makefile: 9
file content (19 lines) | stat: -rw-r--r-- 437 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# see [GH #25]
# check that global %COLORS is concurrency safe
use GD::Simple;
use Test::More;
BEGIN {
  eval 'use Test::Fork;';
  plan skip_all => 'Test::Fork required' if $@;
  # see cpantesters, not repro for me
  plan skip_all => "Test::Fork broken on $^O" if $^O eq 'freebsd';
}
plan 'no_plan';

for (1..10) {
  fork_ok(1,
          sub{
            GD::Simple->new->bgcolor('transparent');
            ok(!$@, $@);
          });
}