File: 100-internal-pm-file-compiles.t

package info (click to toggle)
libtest-compile-perl 1.0.1-1~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 252 kB
  • sloc: perl: 516; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 657 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!perl

use strict;
use warnings;

use Test::More;
use Test::Compile::Internal;

my $internal = Test::Compile::Internal->new();
$internal->verbose(0);

my $yes = $internal->pm_file_compiles('t/scripts/Module.pm');
ok($yes, "Module.pm should compile");

my $no = $internal->pm_file_compiles('t/scripts/CVS/Ignore.pm');
ok(!$no, "Ignore.pm should not compile");

my $notfound = $internal->pm_file_compiles('t/scripts/NotFound.pm');
ok(!$notfound, "NotFound.pm should not compile");

note "Does not call import"; {
    my $result = $internal->pm_file_compiles('t/scripts/LethalImport.pm');
    ok $result, "Does not call import() routines";
}

done_testing();