Debian Codegraph @

t/maintainer.t

raw symbols SCIP
1 use strict;
2 use warnings;
3 use Test::More;
4
5 plan skip_all => 'These tests only run in core'
6 unless $ENV{PERL_CORE};
7
8 my @mods = qw[
9 Module::CoreList
10 Module::CoreList::Utils
11 ];
12
13 plan tests => 3 + scalar @mods;
14
15 my %vers;
16
17 foreach my $mod ( @mods ) {
18 use_ok($mod);
19 $vers{ $mod->VERSION }++;
20 }
21
22 is( scalar keys %vers, 1, 'All Module-CoreList modules should have the same $VERSION' );
23
24 # Check that there is a release entry for the current perl version
25 my $released = $Module::CoreList::released{ $] };
26 # duplicate fetch to avoid 'used only once: possible typo' warning
27 $released = $Module::CoreList::released{ $] };
28
29 ok( defined $released, "There is a released entry for $]" );
30 like( $released, qr!^\d{4}\-\d{2}\-\d{2}$!, 'It should be a date in YYYY-MM-DD format' );