This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add Module-CoreList maintainer tests
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Thu, 1 Jun 2017 12:28:00 +0000 (13:28 +0100)
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Thu, 1 Jun 2017 12:52:15 +0000 (13:52 +0100)
MANIFEST
dist/Module-CoreList/t/maintainer.t [new file with mode: 0644]

index e6d1dea..9fba880 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -3509,6 +3509,7 @@ dist/Module-CoreList/t/corelist.t         Module::CoreList tests
 dist/Module-CoreList/t/deprecated.t            Module::CoreList tests
 dist/Module-CoreList/t/find_modules.t          Module::CoreList tests
 dist/Module-CoreList/t/is_core.t               Module::CoreList tests
+dist/Module-CoreList/t/maintainer.t                    Module::CoreList tests
 dist/Module-CoreList/t/pod.t                   Module::CoreList tests
 dist/Module-CoreList/t/utils.t                 Module::CoreList tests
 dist/Net-Ping/Changes                  Net::Ping
diff --git a/dist/Module-CoreList/t/maintainer.t b/dist/Module-CoreList/t/maintainer.t
new file mode 100644 (file)
index 0000000..7a3d658
--- /dev/null
@@ -0,0 +1,28 @@
+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::TieHashDelta
+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{ $] };
+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' );