File: analyse_devel_timer.t

package info (click to toggle)
libmodule-cpants-analyse-perl 0.85%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 340 kB
  • ctags: 86
  • sloc: perl: 1,682; sh: 48; makefile: 10
file content (33 lines) | stat: -rw-r--r-- 949 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
25
26
27
28
29
30
31
32
33
use Test::More tests => 13;

use Module::CPANTS::Analyse;
use File::Spec::Functions;
my $a=Module::CPANTS::Analyse->new({
    dist=>'t/eg/Devel-Timer-0.02.tar.gz',
    _dont_cleanup=>$ENV{DONT_CLEANUP},
});

my $rv=$a->unpack;
is($rv,undef,'unpack ok');

$a->analyse;

my $d=$a->d;

is($d->{files},12,'files');
is($d->{size_packed},10646,'size_packed');
is(ref($d->{modules}),'ARRAY','modules is ARRAY');
my $modcount=grep {$_->{module} eq 'Devel::Timer'} @{$d->{modules}};
is($modcount,1,'module');
is(ref($d->{prereq}),'','prereq is empty');
is(ref($d->{uses}),'HASH','uses is HASH');
is($d->{uses}{'Test::More'}{in_tests},3,'uses');
ok($d->{file_meta_yml},'has_yaml');
ok($d->{metayml_is_parsable},'metayml_is_parsable');
ok(!$d->{metayml_parse_error},'metayml_parse_error was not set');
ok(!$d->{license},'no license');
ok(!$d->{needs_compiler}, 'does not need compiler');

#use Data::Dumper;
#diag(Dumper $d);