3 # Testing of META.yml containing AVAR's name
6 if( $ENV{PERL_CORE} ) {
8 @INC = ('../lib', 'lib');
11 unshift @INC, 't/lib/';
21 use File::Spec::Functions ':ALL';
22 use Parse::CPAN::Meta::Test;
23 use Test::More tests(0, 1, 4);
29 #####################################################################
30 # Testing that Perl::Smith config files work
32 my $sample_file = catfile( test_data_directory(), 'multibyte.yml' );
33 my $sample = load_ok( 'multibyte.yml', $sample_file, 450 );
35 # Does the string parse to the structure
36 my $name = "multibyte";
37 my $yaml_copy = $sample;
38 my @yaml = eval { Parse::CPAN::Meta::Load( $yaml_copy ); };
39 is( $@, '', "$name: Parse::CPAN::Meta::Load parses without error" );
40 is( $yaml_copy, $sample, "$name: Parse::CPAN::Meta::Load does not modify the input string" );
42 skip( "Shortcutting after failure", 1 ) if $@;
43 is_deeply( $yaml[0]->{build_requires}, {
47 }, 'build_requires ok' );
51 skip "no utf8 support", 1 unless Parse::CPAN::Meta::HAVE_UTF8();
52 ok( utf8::is_utf8($yaml[0]->{author}), "utf8 decoded" );