File: meta.t

package info (click to toggle)
libcpanel-json-xs-perl 4.39-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,872 kB
  • sloc: perl: 1,165; makefile: 8
file content (32 lines) | stat: -rw-r--r-- 829 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# -*- perl -*-

# Test that our META.yml file matches the current specification.

use strict;
BEGIN {
  $|  = 1;
  $^W = 1;
}

my $MODULE = 'Test::CPAN::Meta 0.12';

# Don't run tests for installs
use Test::More;
use Config;
plan skip_all => 'This test is only run for the module author'
    unless -d '.git' || $ENV{AUTHOR_TESTING};
plan skip_all => 'Test::CPAN::Meta fails with clang -faddress-sanitizer'
  if $Config{ccflags} =~ /-faddress-sanitizer/;
# META is only generated by make dist
if (! -f 'META.yml' and -f 'MYMETA.yml') {
  system "$Config{cp} MYMETA.yml META.yml";
}

# Load the testing module
eval "use $MODULE;";
if ( $@ ) {
  plan( skip_all => "$MODULE not available for testing" );
  die "Failed to load required release-testing module $MODULE 0.12"
    if -d '.git' || $ENV{AUTHOR_TESTING};
}
meta_yaml_ok();