This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta updates
[perl5.git] / cpan / CPAN-Meta-YAML / t / 13_perl_smith.t
1 # Testing of common META.yml examples
2
3 use strict;
4 use warnings;
5
6 BEGIN {
7     $|  = 1;
8     $^W = 1;
9 }
10
11 use File::Spec::Functions ':ALL';
12 use t::lib::Test;
13 use Test::More tests(1, 1);
14 use CPAN::Meta::YAML;
15
16
17
18
19
20 #####################################################################
21 # Testing that Perl::Smith config files work
22
23 my $vanilla_file = catfile( test_data_directory(), 'vanilla.yml' );
24 my $vanilla      = load_ok( 'yanilla.yml', $vanilla_file, 1000 );
25
26 yaml_ok(
27     $vanilla,
28     [ {
29         package_name    => 'VanillaPerl',
30         package_version => 5,
31         download_dir    => 'c:\temp\vp_sources',
32         build_dir       => 'c:\temp\vp_build',
33         image_dir       => 'c:\vanilla-perl',
34         binary          => [
35             {
36                 name    => 'dmake',
37                 url     => 'http://search.cpan.org/CPAN/authors/id/S/SH/SHAY/dmake-4.5-20060619-SHAY.zip',
38                 license => {
39                     'dmake/COPYING' => 'dmake/COPYING',
40                     'dmake/readme/license.txt' => 'dmake/license.txt',
41                 },
42                 install_to => {
43                     'dmake/dmake.exe' => 'dmake/bin/dmake.exe',
44                     'dmake/startup' => 'dmake/bin/startup',
45                 },
46             },
47             {
48                 name       => 'gcc-core',
49                 url        => 'http://umn.dl.sourceforge.net/mingw/gcc-core-3.4.5-20060117-1.tar.gz',
50                 license    => {
51                     'COPYING'     => 'gcc/COPYING',
52                     'COPYING.lib' => 'gcc/COPYING.lib',
53                 },
54                 install_to => 'mingw',
55             },
56             {
57                 name       => 'gcc-g++',
58                 url        => 'http://umn.dl.sourceforge.net/mingw/gcc-g++-3.4.5-20060117-1.tar.gz',
59                 license    => undef,
60                 install_to => 'mingw',
61             },
62             {
63                 name       => 'binutils',
64                 url        => 'http://umn.dl.sourceforge.net/mingw/binutils-2.16.91-20060119-1.tar.gz',
65                 license    => {
66                     'Copying'     => 'binutils/Copying',
67                     'Copying.lib' => 'binutils/Copying.lib',
68                 },
69                 install_to => 'mingw',
70             },
71             {
72                 name       => 'mingw-runtime',
73                 url        => 'http://umn.dl.sourceforge.net/mingw/mingw-runtime-3.10.tar.gz',
74                 license    => {
75                     'doc/mingw-runtime/Contributors' => 'mingw/Contributors',
76                     'doc/mingw-runtime/Disclaimer'   => 'mingw/Disclaimer',
77                 },
78                 install_to => 'mingw',
79             },
80             {
81                 name       => 'w32api',
82                 url        => 'http://umn.dl.sourceforge.net/mingw/w32api-3.6.tar.gz',
83                 license    => undef,
84                 install_to => 'mingw',
85                 extra      => {
86                     'extra\README.w32api' => 'licenses\win32api\README.w32api',
87                 },
88             }
89         ],
90         source => [
91             {
92                 name       => 'perl',
93                 url        => 'http://mirrors.kernel.org/CPAN/src/perl-5.8.8.tar.gz',
94                 license    => {
95                     'perl-5.8.8/Readme'   => 'perl/Readme',
96                     'perl-5.8.8/Artistic' => 'perl/Artistic',
97                     'perl-5.8.8/Copying'  => 'perl/Copying',
98                 },
99                 unpack_to  => 'perl',
100                 install_to => 'perl',
101                 after      => {
102                     'extra\Config.pm' => 'lib\CPAN\Config.pm',
103                 },
104             }
105         ],
106         modules => [
107             {
108                 name      => 'Win32::Job',
109                 unpack_to => {
110                     APIFile => 'Win32API-File',
111                 },
112             },
113             {
114                 name  => 'IO',
115                 force => 1,
116             },
117             {
118                 name => 'Compress::Zlib',
119             },
120             {
121                 name => 'IO::Zlib',
122             },
123             {
124                 name => 'Archive::Tar',
125             },
126             {
127                 name  => 'Net::FTP',
128                 extra => {
129                     'extra\libnet.cfg' => 'libnet.cfg',
130                 },
131             },
132         ],
133         extra => {
134             'README' => 'README.txt',
135             'LICENSE.txt' => 'LICENSE.txt',
136             'Changes' => 'Release-Notes.txt',
137             'extra\Config.pm' => 'perl\lib\CPAN\Config.pm',
138             'extra\links\Perl-Documentation.url' => 'links\Perl Documentation.url',
139             'extra\links\Perl-Homepage.url' => 'links\Perl Homepage.url',
140             'extra\links\Perl-Mailing-Lists.url' => 'links\Perl Mailing Lists.url',
141             'extra\links\Perlmonks-Community-Forum.url' => 'links\Perlmonks Community Forum.url',
142             'extra\links\Search-CPAN-Modules.url' => 'links\Search CPAN Modules.url',
143             'extra\links\Vanilla-Perl-Homepage.url' => 'links\Vanilla Perl Homepage.url',
144         },
145     } ],
146     'vanilla.yml',
147     nosyck     => 1,
148     noyamlperl => 1,
149 );