4 if( $ENV{PERL_CORE} ) {
6 @INC = ('../lib', 'lib');
9 unshift @INC, 't/lib/';
19 use File::Spec::Functions ':ALL';
20 use Parse::CPAN::Meta::Test;
21 use Test::More tests(0, 1, 3);
27 #####################################################################
28 # Testing that Perl::Smith config files work
30 my $sample_file = catfile( test_data_directory(), 'utf_16_le_bom.yml' );
31 my $sample = load_ok( 'utf_16_le_bom.yml', $sample_file, 3 );
33 # Does the string parse to the structure
35 my $yaml_copy = $sample;
36 my $yaml = eval { Parse::CPAN::Meta::Load( $yaml_copy ); };
37 is( $yaml_copy, $sample, "$name: Parse::CPAN::Meta::Load does not modify the input string" );
38 is( $yaml, undef, "file not parsed" );
39 ok( $@ =~ "Stream has a non UTF-8 Unicode Byte Order Mark", "correct error" );