This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
new perldelta
[perl5.git] / ext / B / t / strict.t
1 #!./perl -w
2
3 use strict;
4 use warnings;
5
6 use Config;
7 use Test::More;
8
9 BEGIN {
10     if ( ( $Config{'extensions'} !~ /\bB\b/ ) ) {
11         plan skip_all => "Perl was not compiled with B";
12         exit 0;
13     }
14 }
15
16 use strict;
17 use warnings;
18
19 use B ();
20 use O ();
21
22 foreach 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
30 done_testing();