Debian Codegraph @

t/950-kwalitee/070-mymeta.t

raw
1 #!perl -w
2 use strict;
3 use Test::More;
4 plan skip_all => "Only run as part of the dist"
5 unless -f "MYMETA.json";
6 eval "use CPAN::Meta 2.110580;";
7 plan skip_all => "CPAN::Meta required for testing META.json"
8 if $@;
9 plan skip_all => "Only if automated or author testing"
10 unless $ENV{AUTOMATED_TESTING} || -d ".git";
11 plan tests => 1;
12
13 my $meta;
14 unless (ok(eval {
15 $meta = CPAN::Meta->load_file("MYMETA.json",
16 { lazy_validation => 0 }) },
17 "loaded MYMETA.json successfully")) {
18 diag($@);
19 }