-
Notifications
You must be signed in to change notification settings - Fork 4
/
cpanfile.t
35 lines (31 loc) · 783 Bytes
/
cpanfile.t
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
34
35
use strict;
use Test::More;
use Test::DZil;
{
my $tzil = Builder->from_config(
{ dist_root => 't/dist' },
{ add_files => {
'source/dist.ini' => simple_ini('GatherDir', 'MetaJSON', 'Prereqs::FromCPANfile'),
} },
);
$tzil->build;
my $json = $tzil->slurp_file('build/META.json');
my $meta = JSON->new->decode($json);
is_deeply $meta->{prereqs}, {
runtime => {
requires => {
'Plack' => '1.0000', # normalized
'DBI' => '>= 1, < 2',
},
},
test => {
requires => {
'Test::More' => '0.90',
},
recommends => {
'Test::TCP' => '0.2',
},
},
};
}
done_testing;