File: 000-require-modules.t

package info (click to toggle)
libinline-perl 0.86-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 504 kB
  • sloc: perl: 3,147; sh: 57; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 274 bytes parent folder | download | duplicates (24)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# This test does a basic `use` check on all the code.
use Test::More;

use File::Find;

sub test {
    s{^lib/(.*)\.pm$}{$1} or return;
    s{/}{::}g;
    ok eval("require $_; 1"), "require $_;$@";
}

find {
    wanted => \&test,
    no_chdir => 1,
}, 'lib';

done_testing;