| 1 | use strictscip-perl cpan Module-CoreList 5.20260820 strict/; |
| 2 | use warningsscip-perl cpan Module-CoreList 5.20260820 warnings/; |
| 3 | use Test::Morescip-perl cpan Module-CoreList 5.20260820 Test/More/; |
| 4 | |
| 5 | planscip-perl cpan Module-CoreList 5.20260820 main/plan(). skip_all => 'These tests only run in core' |
| 6 | unless $ENVscip-perl cpan Module-CoreList 5.20260820 main/`%ENV`.{PERL_CORE}; |
| 7 | |
| 8 | my @mods = qw[ |
| 9 | Module::CoreList |
| 10 | Module::CoreList::Utils |
| 11 | ]; |
| 12 | |
| 13 | planscip-perl cpan Module-CoreList 5.20260820 main/plan(). tests => 3 + scalarscip-perl cpan Module-CoreList 5.20260820 main/scalar(). @mods; |
| 14 | |
| 15 | my %vers; |
| 16 | |
| 17 | foreach my $mod ( @mods ) { |
| 18 | use_okscip-perl cpan Module-CoreList 5.20260820 main/use_ok().($mod); |
| 19 | $vers{ $mod->VERSIONscip-perl cpan Module-CoreList 5.20260820 main/VERSION(). }++; |
| 20 | } |
| 21 | |
| 22 | isscip-perl cpan Module-CoreList 5.20260820 main/is().( scalarscip-perl cpan Module-CoreList 5.20260820 main/scalar(). keysscip-perl cpan Module-CoreList 5.20260820 main/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::releasedscip-perl cpan Module-CoreList 5.20260820 Module/CoreList/`%released`.{ $]scip-perl cpan Module-CoreList 5.20260820 main/`$]`. }; |
| 26 | # duplicate fetch to avoid 'used only once: possible typo' warning |
| 27 | $released = $Module::CoreList::releasedscip-perl cpan Module-CoreList 5.20260820 Module/CoreList/`%released`.{ $]scip-perl cpan Module-CoreList 5.20260820 main/`$]`. }; |
| 28 | |
| 29 | okscip-perl cpan Module-CoreList 5.20260820 main/ok().( definedscip-perl cpan Module-CoreList 5.20260820 main/defined(). $released, "There is a released entry for $]" ); |
| 30 | likescip-perl cpan Module-CoreList 5.20260820 main/like().( $released, qr!^\d{4}\-\d{2}\-\d{2}$!, 'It should be a date in YYYY-MM-DD format' ); |