summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/lib/Test/Simple/t/BEGIN_use_ok.t
blob: 476badf7a293ba2c647e2ced25e532d7acf2440b (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
#!/usr/bin/perl -w

# [rt.cpan.org 28345]
#
# A use_ok() inside a BEGIN block lacking a plan would be silently ignored.

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

use Test::More;

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

ok( $result, "use_ok() ran" );
done_testing(2);