11 local $Data::Dumper::Terse = 1;
12 local $Data::Dumper::Sortkeys = 1;
13 local $Data::Dumper::Indent = 1;
14 my $out = Data::Dumper::Dumper(@_);
16 $out eq 'undef' ? undef : $out;
19 if ( !Config::Any::YAML->is_supported && !$ENV{RELEASE_TESTING} ) {
20 plan skip_all => 'YAML format not supported';
27 my $config = Config::Any::YAML->load( 't/conf/conf.yml' );
29 is( $config->{ name }, 'TestApp' );
34 local $TODO = 'YAML::Syck parses invalid files'
35 if $INC{'YAML/Syck.pm'};
36 my $file = 't/invalid/conf.yml';
37 my $config = eval { Config::Any::YAML->load( $file ) };
40 is _dump($config), undef, 'config load failed';
41 isnt $@, '', 'error thrown';
44 # parse error generated on invalid config
46 local $TODO = 'YAML::Syck parses invalid files'
47 if $INC{'YAML/Syck.pm'};
48 my $file = 't/invalid/conf.yml';
49 my $config = eval { Config::Any->load_files( { files => [$file], use_ext => 1} ) };
51 is _dump($config), undef, 'config load failed';
52 isnt $@, '', 'error thrown';