Ovid wrote:
> I can never get it to work with the Test::Class code, using either prove or
> runtests. In the regular .t style program, it succeeds if I use a leading
> plan, but fails if I use a trailing plan with runtests:
>
> use Test::More tests => 3;
>
> Versus:
>
> use Test::More 'no_plan';
Can you confirm that this works OK with your runtests?
#!/usr/bin/perl
use strict;
use warnings;
use Test::More 'no_plan';
use Test::Builder;
ok 1, 'mytest called';
my $test = Test::Builder->new;
my $test_num;
if ( !defined( my $child_pid = fork() ) ) {
diag "Cannot fork: $!";
}
elsif ( !$child_pid ) {
ok 1, 'in the child';
}
else {
waitpid( $child_pid, 0 );
$test->current_test( 2 );
ok 1, 'in the parent';
}
--
Andy Armstrong, Hexten