File: maintainer.t

package info (click to toggle)
perl 5.40.1-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 126,156 kB
  • sloc: ansic: 668,539; perl: 525,522; sh: 72,038; pascal: 6,925; xml: 2,428; yacc: 1,410; makefile: 1,191; cpp: 208; lisp: 1
file content (30 lines) | stat: -rw-r--r-- 770 bytes parent folder | download | duplicates (11)
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
use strict;
use warnings;
use Test::More;

plan skip_all => 'These tests only run in core'
  unless $ENV{PERL_CORE};

my @mods = qw[
Module::CoreList
Module::CoreList::Utils
];

plan tests => 3 + scalar @mods;

my %vers;

foreach my $mod ( @mods ) {
  use_ok($mod);
  $vers{ $mod->VERSION }++;
}

is( scalar keys %vers, 1, 'All Module-CoreList modules should have the same $VERSION' );

# Check that there is a release entry for the current perl version
my $released = $Module::CoreList::released{ $] };
# duplicate fetch to avoid 'used only once: possible typo' warning
$released = $Module::CoreList::released{ $] };

ok( defined $released, "There is a released entry for $]" );
like( $released, qr!^\d{4}\-\d{2}\-\d{2}$!, 'It should be a date in YYYY-MM-DD format' );