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