File: 100-internal-all-pl-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-- 693 bytes parent folder | download
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 File::Spec;
use Test::More;
use Test::Compile::Internal;

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

my @files;

@files = sort $internal->all_pl_files();
is(scalar @files,0,'Found correct number of scripts in default location');

@files = sort $internal->all_pl_files('t/scripts');
is(scalar @files,4,'Found correct number of scripts in t/scripts');
like($files[0],qr/t.scripts.failure.pl/,'Found script: failure.pl');
like($files[1],qr/t.scripts.lib.pl/,'Found script: lib.pl');
like($files[2],qr/t.scripts.subdir.success.pl/,'Found script: success.pl');
like($files[3],qr/t.scripts.taint.pl/,'Found script: taint.pl');

$internal->done_testing();