Add porting test for Module-CoreList
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Tue, 4 Feb 2014 10:16:55 +0000 (10:16 +0000)
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Tue, 4 Feb 2014 10:22:40 +0000 (10:22 +0000)
When the perl version is bumped in blead, Module-CoreList
should be prepared to include a stub entry for this new version.

This tests for the existence of the stub-entry.

MANIFEST
t/porting/corelist.t [new file with mode: 0644]

index f20141d..bb3e30b 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -5328,6 +5328,7 @@ t/porting/checkcase.t             Check whether we are case-insensitive-fs-friendly
 t/porting/checkcfgvar.t                Check that all config.sh-like files are good
 t/porting/cmp_version.t                Test whether all changed module files have their VERSION bumped
 t/porting/copyright.t          Check that copyright years match
+t/porting/corelist.t           Check that Module-CoreList has perl versions for the current perl
 t/porting/customized.dat               Data file for porting/customized.t
 t/porting/customized.t         Check all CUSTOMIZED files are as they should be
 t/porting/diag.t               Test completeness of perldiag.pod
diff --git a/t/porting/corelist.t b/t/porting/corelist.t
new file mode 100644 (file)
index 0000000..bff1b69
--- /dev/null
@@ -0,0 +1,21 @@
+#!perl -w
+
+# Check that the current version of perl exists in Module-CoreList data
+
+use TestInit qw(T);
+use strict;
+use Config;
+
+require 't/test.pl';
+
+plan(tests => 5);
+
+use_ok('Module::CoreList');
+use_ok('Module::CoreList::Utils');
+
+{
+  no warnings 'once';
+  ok( defined $Module::CoreList::released{ $] }, "$] exists in released" );
+  ok( defined $Module::CoreList::version{ $] }, "$] exists in version" );
+  ok( defined $Module::CoreList::Utils::utilities{$] }, "$] exists in Utils" );
+}