File: 00-load.t

package info (click to toggle)
libtest-database-perl 1.112-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 272 kB
  • ctags: 83
  • sloc: perl: 637; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 439 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use strict;
use warnings;
use Test::More;
use File::Find;

my @modules;
find( sub { push @modules, $File::Find::name if /\.pm$/ }, 'lib' );

plan tests => scalar @modules;

@modules = reverse sort map { s!/!::!g; s/\.pm$//; s/^lib:://; $_ } @modules;

# load in isolation
local $ENV{PERL5LIB} = join $Config::Config{path_sep} || ';', @INC;
for my $module (@modules) {
    `$^X -M$module -e1`;
    is( $? >> 8, 0, "perl -M$module -e1" );
}