File: corelist.t

package info (click to toggle)
perl 5.10.1-17squeeze6
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 74,280 kB
  • ctags: 49,087
  • sloc: perl: 319,380; ansic: 193,238; sh: 37,981; pascal: 8,830; lisp: 7,515; cpp: 3,893; makefile: 2,375; xml: 1,972; yacc: 1,555
file content (52 lines) | stat: -rwxr-xr-x 1,771 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!perl -w
use strict;
use Module::CoreList;
use Test::More tests => 13;

BEGIN { require_ok('Module::CoreList'); }

ok($Module::CoreList::version{5.00503},    "5.00503");

ok(!exists $Module::CoreList::version{5.00503}{attributes},
   "attributes weren't in 5.00503");

ok($Module::CoreList::version{5.006001},    "5.006001");

ok(exists $Module::CoreList::version{'5.006001'}{attributes},
   "attributes were in 5.6.1");

ok($Module::CoreList::version{5.007003},    "5.007003");

ok(exists $Module::CoreList::version{5.007003}{'Attribute::Handlers'},
   "Attribute::Handlers were bundled with 5.7.3");

is(Module::CoreList->first_release_by_date('File::Spec'), 5.005,
   "File::Spec was first bundled in 5.005");

is(Module::CoreList->first_release('File::Spec'), 5.00405,
   "File::Spec was released in perl with lowest version number 5.00405");

is(Module::CoreList->first_release('File::Spec', 0.82), 5.006_001,
   "File::Spec reached 0.82 with 5.006_001");

is_deeply([ sort keys %Module::CoreList::released ],
          [ sort keys %Module::CoreList::version ],
          "have a note of everythings release");

is_deeply( [ map {
    exists $Module::CoreList::version{ $_ }{FindExt} ? $_ : ()
} keys %Module::CoreList::version ],
           [], "FindExt shouldn't get included rt#6922" );


my $consistent = 1;
for my $family (values %Module::CoreList::families) {
    my $first = shift @$family;
    my $has = join " ", sort keys %{ $Module::CoreList::versions{ $first } };
    for my $member (@$family) {
        $has eq join " ", sort keys %{ $Module::CoreList::versions{ $member } }
          or do { diag "$first -> $member family"; $consistent = 0 };
    }
}
is( $consistent, 1,
    "families seem consistent (descendants have same modules as ancestors)" );