Lines Matching full:yaml
64 # These test YAML/JSON detection without the typical file name suffix
65 my $yaml_meta = catfile( test_data_directory(), 'yaml.meta' );
68 ### YAML tests
70 local $ENV{PERL_YAML_BACKEND} if not $ENV{PERL_CORE}; # ensure we always get CPAN::META::YAML
72 is(Parse::CPAN::Meta->yaml_backend(), 'CPAN::Meta::YAML', 'yaml_backend(): CPAN::Meta::YAML');
74 is_deeply($from_yaml, $want, "load from YAML file results in expected data");
78 local $ENV{PERL_YAML_BACKEND} if not $ENV{PERL_CORE}; # ensure we always get CPAN::META::YAML
81 is(Parse::CPAN::Meta->yaml_backend(), 'CPAN::Meta::YAML', 'yaml_backend(): CPAN::Meta::YAML');
83 is_deeply($from_yaml, $want, "load from YAML .meta file results in expected data");
87 local $ENV{PERL_YAML_BACKEND} if not $ENV{PERL_CORE}; # ensure we always get CPAN::META::YAML
90 is(Parse::CPAN::Meta->yaml_backend(), 'CPAN::Meta::YAML', 'yaml_backend(): CPAN::Meta::YAML');
92 is_deeply($from_yaml, $want, "load from bare YAML .meta file results in expected data");
96 local $ENV{PERL_YAML_BACKEND} if not $ENV{PERL_CORE}; # ensure we always get CPAN::META::YAML
99 is(Parse::CPAN::Meta->yaml_backend(), 'CPAN::Meta::YAML', 'yaml_backend(): CPAN::Meta::YAML');
105 local $ENV{PERL_YAML_BACKEND} if not $ENV{PERL_CORE}; # ensure we always get CPAN::META::YAML
108 is(Parse::CPAN::Meta->yaml_backend(), 'CPAN::Meta::YAML', 'yaml_backend(): CPAN::Meta::YAML');
109 my $yaml = load_ok( $meta_yaml, $meta_yaml, 100, ":encoding(UTF-8)");
110 my $from_yaml = Parse::CPAN::Meta->load_yaml_string( $yaml );
111 is_deeply($from_yaml, $want, "load from YAML str results in expected data");
115 local $ENV{PERL_YAML_BACKEND} if not $ENV{PERL_CORE}; # ensure we always get CPAN::META::YAML
118 is(Parse::CPAN::Meta->yaml_backend(), 'CPAN::Meta::YAML', 'yaml_backend(): CPAN::Meta::YAML');
119 my @yaml = Parse::CPAN::Meta::LoadFile( $bad_yaml_meta );
120 is($yaml[0]{author}[0], 'Olivier Mengu\xE9', "Bad UTF-8 is replaced");
127 skip "YAML module not installed", 2
128 unless eval "require YAML; 1";
129 local $ENV{PERL_YAML_BACKEND} = 'YAML';
131 is(Parse::CPAN::Meta->yaml_backend(), 'YAML', 'yaml_backend(): YAML');
132 my $yaml = load_ok( $meta_yaml, $meta_yaml, 100, ":encoding(UTF-8)");
133 my $from_yaml = Parse::CPAN::Meta->load_yaml_string( $yaml );