This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
bebb370b5559ae834e165256cc9bfcab5a351ba6
[perl5.git] / t / porting / corelist.t
1 #!perl -w
2
3 # Check that the current version of perl exists in Module-CoreList data
4
5 use TestInit qw(T);
6 use strict;
7 use Config;
8
9 require 't/test.pl';
10
11 plan(tests => 9);
12
13 use_ok('Module::CoreList');
14 use_ok('Module::CoreList::Utils');
15 use_ok('Module::CoreList::TieHashDelta');
16
17 {
18   no warnings 'once';
19   ok( defined $Module::CoreList::released{ $] }, "$] exists in released" );
20   ok( defined $Module::CoreList::version{ $] }, "$] exists in version" );
21   ok( defined $Module::CoreList::Utils::utilities{$] }, "$] exists in Utils" );
22 }
23
24 #plan skip_all => 'Special case v5.21.1 because rjbs' if sprintf("v%vd", $^V) eq 'v5.21.1';
25
26 my @modules = qw[
27   Module::CoreList
28   Module::CoreList::Utils
29   Module::CoreList::TieHashDelta
30 ];
31
32 SKIP: {
33   skip('Special case v5.21.1 because rjbs', 3) if sprintf("v%vd", $^V) eq 'v5.21.1';
34   foreach my $mod ( @modules ) {
35     my $vers = eval $mod->VERSION;
36     ok( !( $vers < $] || $vers > $] ), "$mod version should match perl version in core" )
37       or diag("$mod $vers doesn't match $]");
38   }
39 }