| 1 | #!/usr/bin/perl |
| 2 | |
| 3 | # Test that our META.yml file matches the current specification. |
| 4 | |
| 5 | use strictscip-perl cpan Module-Inspector 1.05 strict/; |
| 6 | BEGIN { |
| 7 | $|scip-perl cpan Module-Inspector 1.05 main/`$|`. = 1; |
| 8 | $^Wscip-perl cpan Module-Inspector 1.05 main/`$^W`. = 1; |
| 9 | } |
| 10 | |
| 11 | my $MODULE = 'Test::CPAN::Meta 0.12'; |
| 12 | |
| 13 | # Don't run tests for installs |
| 14 | use Test::Morescip-perl cpan Module-Inspector 1.05 Test/More/; |
| 15 | unless ( $ENVscip-perl cpan Module-Inspector 1.05 main/`%ENV`.{AUTOMATED_TESTING} or $ENVscip-perl cpan Module-Inspector 1.05 main/`%ENV`.{RELEASE_TESTING} ) { |
| 16 | planscip-perl cpan Module-Inspector 1.05 main/plan().( skip_all => "Author tests not required for installation" ); |
| 17 | } |
| 18 | |
| 19 | # Load the testing module |
| 20 | eval "use $MODULE"; |
| 21 | if ( $@scip-perl cpan Module-Inspector 1.05 main/`$@`. ) { |
| 22 | $ENVscip-perl cpan Module-Inspector 1.05 main/`%ENV`.{RELEASE_TESTING} |
| 23 | ? diescip-perl cpan Module-Inspector 1.05 main/die().( "Failed to load required release-testing module $MODULE" ) |
| 24 | : planscip-perl cpan Module-Inspector 1.05 main/plan().( skip_all => "$MODULE not available for testing" ); |
| 25 | } |
| 26 | |
| 27 | meta_yaml_okscip-perl cpan Module-Inspector 1.05 main/meta_yaml_ok().(); |