This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make ext/B/t/strict.t test alike to other ones.
[perl5.git] / ext / B / t / strict.t
CommitLineData
06c80a59
TR
1#!./perl -w
2
3use strict;
4use warnings;
5
6use Config;
7use Test::More;
8
9BEGIN {
dc0a6b7d 10 if ( ( $Config{'extensions'} !~ /\bB\b/ ) ) {
06c80a59
TR
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();