summaryrefslogtreecommitdiff
path: root/cpan/Test-Simple/t/BEGIN_require_ok.t
blob: 733d0bb861cc797e53c6c0fdc21cd3beaadf9b07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/perl -w

# Fixed a problem with BEGIN { use_ok or require_ok } silently failing when there's no
# plan set.  [rt.cpan.org 28345]  Thanks Adriano Ferreira and Yitzchak.

use strict;

BEGIN {
    if( $ENV{PERL_CORE} ) {
        chdir 't';
        @INC = ('../lib', 'lib');
    }
    else {
        unshift @INC, 't/lib';
    }
}

use Test::More;

my $result;
BEGIN {
    $result = require_ok("strict");
}

ok $result, "require_ok ran";

done_testing(2);