xref: /openbsd/gnu/usr.bin/perl/ext/B/t/strict.t (revision f3efcd01)
1#!./perl -w
2
3use strict;
4use warnings;
5
6use Config;
7use Test::More;
8
9BEGIN {
10    if ( ( $Config{'extensions'} !~ /\bB\b/ ) ) {
11        plan skip_all => "Perl was not compiled with B";
12        exit 0;
13    }
14}
15
16use strict;
17use warnings;
18
19use B ();
20use O ();
21
22foreach my $module (qw/B O/) {
23    my $path  = $INC{ $module . '.pm' };
24    my $check = "$^X -cw -Mstrict $path 2>&1";
25    my $got   = `$check`;
26    is( $got, "$path syntax OK\n", "$module.pm compiles without errors" )
27      or diag($got);
28}
29
30done_testing();
31