#!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();
