Lines Matching +full:meta +full:- +full:spec
9 eval { require CPAN::Meta; CPAN::Meta->VERSION(2.143240) }
10 or plan skip_all => 'CPAN::Meta 2.143240 required for this test';
11 eval { require CPAN::Meta::Converter; }
12 or plan skip_all => 'CPAN::Meta::Converter required for this test';
13 eval { require Parse::CPAN::Meta; }
14 or plan skip_all => 'Parse::CPAN::Meta required for this test';
27 my $have_gen = delete $have->{generated_by};
28 my $want_gen = delete $want->{generated_by};
29 my $have_url = delete $have->{'meta-spec'}->{url};
30 my $want_url = delete $want->{'meta-spec'}->{url};
32 like $have_gen, qr{CPAN::Meta}, "CPAN::Meta mentioned in the generated_by";
33 like $have_url, qr{CPAN::Meta::Spec}, "CPAN::Meta::Spec mentioned in meta-spec URL";
41 'meta-spec' => {
42 url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
47 'meta-spec' => {
48 url => 'https://metacpan.org/pod/CPAN::Meta::Spec',
57 DISTNAME => 'Foo-Bar',
69 name => 'Foo-Bar',
77 my $mm = $new_mm->(@GENERIC_IN);
78 is_deeply $mm->metafile_data, {
82 is_deeply $mm->metafile_data({}, { no_index => { directory => [qw(foo)] } }), {
90 my $mm = $new_mm->(
91 DISTNAME => 'Foo-Bar',
96 is_deeply $mm->metafile_data(
123 # Test MIN_PERL_VERSION meta-spec 1.4
125 my $mm = $new_mm->(
129 is_deeply $mm->metafile_data( {}, { @METASPEC14 }, ), {
135 }, 'MIN_PERL_VERSION meta-spec 1.4';
138 # Test MIN_PERL_VERSION meta-spec 2.0
140 my $mm = $new_mm->(
144 is_deeply $mm->metafile_data, {
150 }, 'MIN_PERL_VERSION meta-spec 2.0';
153 # Test MIN_PERL_VERSION meta-spec 1.4
155 my $mm = $new_mm->(
160 is_deeply $mm->metafile_data, {
171 }, 'MIN_PERL_VERSION and PREREQ_PM meta-spec 1.4';
174 # Test CONFIGURE_REQUIRES meta-spec 1.4
176 my $mm = $new_mm->(
180 is_deeply $mm->metafile_data( {}, { @METASPEC14 }, ), {
186 },'CONFIGURE_REQUIRES meta-spec 1.4';
189 # Test CONFIGURE_REQUIRES meta-spec 2.0
191 my $mm = $new_mm->(
195 is_deeply $mm->metafile_data, {
201 },'CONFIGURE_REQUIRES meta-spec 2.0';
204 # Test BUILD_REQUIRES meta-spec 1.4
206 my $mm = $new_mm->(
209 META_MERGE => { "meta-spec" => { version => 1.4 }},
211 is_deeply $mm->metafile_data( {}, { @METASPEC14 }, ), {
217 },'BUILD_REQUIRES meta-spec 1.4';
220 # Test BUILD_REQUIRES meta-spec 2.0
222 my $mm = $new_mm->(
226 is_deeply $mm->metafile_data, {
232 },'BUILD_REQUIRES meta-spec 2.0';
235 # Test TEST_REQUIRES meta-spec 1.4
237 my $mm = $new_mm->(
240 META_MERGE => { "meta-spec" => { version => 1.4 }},
242 is_deeply $mm->metafile_data( {}, { @METASPEC14 }, ), {
248 },'TEST_REQUIRES meta-spec 1.4';
251 # Test TEST_REQUIRES meta-spec 2.0
253 my $mm = $new_mm->(
257 is_deeply $mm->metafile_data, {
263 },'TEST_REQUIRES meta-spec 2.0';
267 my $mm = $new_mm->(
270 is_deeply $mm->metafile_data(
273 homepage => "https://metacpan.org/release/ExtUtils-MakeMaker",
274 repository => "http://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker",
281 homepage => "https://metacpan.org/release/ExtUtils-MakeMaker",
283 url => "http://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker",
287 }, 'META_ADD takes meta version 1.4 from META_MERGE';
291 my $mm = $new_mm->(
294 is_deeply $mm->metafile_data(
298 homepage => "https://metacpan.org/release/ExtUtils-MakeMaker",
299 repository => "http://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker",
305 homepage => "https://metacpan.org/release/ExtUtils-MakeMaker",
307 url => "http://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker",
311 }, 'META_MERGE takes meta version 1.4 from META_ADD';
315 my $mm = $new_mm->(
318 is_deeply $mm->metafile_data(
339 }, 'META_ADD takes meta version 2 from META_MERGE';
343 my $mm = $new_mm->(
346 is_deeply $mm->metafile_data(
367 }, 'META_MERGE takes meta version 2 from META_ADD';
372 my $mm = $new_mm->(
377 is_deeply $mm->metafile_data($meta_add), {
383 },'META.yml data (META_ADD wins)';
387 name => 'ExtUtils-MakeMaker',
398 "File::Spec" => "0.8",
410 … bugtracker => { web => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker' },
411 repository => { url => 'http://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker' },
418 … generated_by => "ExtUtils::MakeMaker version 6.5707, CPAN::Meta::Converter version 2.110580",
421 mymeta_ok $mm->mymeta("t/META_for_testing.json"),
424 mymeta_ok $mm->mymeta("t/META_for_testing.yml"),
430 my $mm = $new_mm->(
436 my $meta = $mm->mymeta('t/META_for_testing.json');
437 is($meta->{configure_requires}, undef, "no configure_requires in v2 META");
438 is($meta->{build_requires}, undef, "no build_requires in v2 META");
440 $meta->{prereqs}{configure}{requires},
442 "configure requires are one thing in META v2...",
445 $meta->{prereqs}{build}{requires},
447 "build requires are one thing in META v2...",
450 $meta->{prereqs}{test}{requires},
456 note "CPAN::Meta bug using the module version instead of the meta spec version";
458 my $mm = $new_mm->(
468 my $meta = $mm->mymeta("t/META_for_testing_tricky_version.yml");
469 is $meta->{'meta-spec'}{version}, 2, "internally, our MYMETA struct is v2";
471 $mm->write_mymeta($meta);
472 ok -e "MYMETA.yml";
473 ok -e "MYMETA.json";
474 my $meta_yml = Parse::CPAN::Meta->load_file("MYMETA.yml");
475 is $meta_yml->{'meta-spec'}{version}, 1.4, "MYMETA.yml correctly downgraded to 1.4";
476 my $meta_json = Parse::CPAN::Meta->load_file("MYMETA.json");
477 cmp_ok $meta_json->{'meta-spec'}{version}, ">=", 2, "MYMETA.json at 2 or better";
483 my $mm = $new_mm->(
488 my $meta = $mm->mymeta;
491 $mm->write_mymeta($meta);
493 my $meta_yml = Parse::CPAN::Meta->load_file("MYMETA.yml");
494 is $meta_yml->{license}, "unknown", "in yaml";
495 my $meta_json = Parse::CPAN::Meta->load_file("MYMETA.json");
496 is_deeply $meta_json->{license}, ["unknown"], "in json";