File: 100-internal-all-pm-files.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 (24 lines) | stat: -rw-r--r-- 748 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!perl

use strict;
use warnings;

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

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

my @files;

@files = sort $internal->all_pm_files();
is(@files,2,'Found correct number of modules in default location');
like($files[0],qr/lib.Test.Compile.pm/,'Found module: Compile.pm');
like($files[1],qr/lib.Test.Compile.Internal.pm/,'Found module: Internal.pm');

@files = sort $internal->all_pm_files('t/scripts');
is(@files,3,'Found correct number of modules in t/scripts');
like($files[0],qr/t.scripts.LethalImport.pm/,'Found module: Module2.pm');
like($files[1],qr/t.scripts.Module.pm/,'Found module: Module.pm');
like($files[2],qr/t.scripts.Module2.pm/,'Found module: Module2.pm');

$internal->done_testing();