Upgrade to Parse::CPAN::Meta 1.38
[p5sagit/p5-mst-13.2.git] / lib / Parse / CPAN / Meta / t / 14_yaml_org.t
CommitLineData
be96f5c3 1#!/usr/bin/perl
2
3# Testing of common META.yml examples
4
5BEGIN {
6 if( $ENV{PERL_CORE} ) {
7 chdir 't';
8 @INC = ('../lib', 'lib');
9 }
10 else {
11 unshift @INC, 't/lib/';
12 }
13}
14
15use strict;
16BEGIN {
17 $| = 1;
18 $^W = 1;
19}
20
21use File::Spec::Functions ':ALL';
22use Parse::CPAN::Meta::Test;
23use Test::More tests(1, 1);
24
25
26
27
28
29#####################################################################
30# Testing that Perl::Smith config files work
31
32my $sample_file = catfile( test_data_directory(), 'sample.yml' );
33my $sample = load_ok( 'sample.yml', $sample_file, 500 );
34
35yaml_ok(
36 $sample,
37 [ {
38 invoice => 34843,
39 date => '2001-01-23',
40 'bill-to' => {
41 given => 'Chris',
42 family => 'Dumars',
43 address => {
44 lines => "458 Walkman Dr.\nSuite #292\n",
45 city => 'Royal Oak',
46 state => 'MI',
47 postal => 48046,
48 },
49 },
50 product => [
51 {
52 sku => 'BL394D',
53 quantity => '4',
54 description => 'Basketball',
55 price => '450.00',
56 },
57 {
58 sku => 'BL4438H',
59 quantity => '1',
60 description => 'Super Hoop',
61 price => '2392.00',
62 },
63 ],
64 tax => '251.42',
65 total => '4443.52',
66 comments => <<'END_TEXT',
67Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338.
68END_TEXT
69 } ],
70 'sample.yml',
de044c36 71 # nosyck => 1,
be96f5c3 72);