X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FConfig-Any.git;a=blobdiff_plain;f=t%2F55-yaml.t;h=b6d1f9e7102fb5eb09fe9aa81bfe3662f55b0d63;hp=7b7b5bcc170facc8613a69b31ba459afa0504dbe;hb=67a1cd509bfc3f77a4fcaf42710de01597987bb0;hpb=f9f3d682a0332cec1207764dcada85a7ff7750f0 diff --git a/t/55-yaml.t b/t/55-yaml.t index 7b7b5bc..b6d1f9e 100644 --- a/t/55-yaml.t +++ b/t/55-yaml.t @@ -3,13 +3,14 @@ use warnings; no warnings 'once'; use Test::More; +use Config::Any; use Config::Any::YAML; if ( !Config::Any::YAML->is_supported ) { plan skip_all => 'YAML format not supported'; } else { - plan tests => 4; + plan tests => 6; } { @@ -26,3 +27,12 @@ else { ok( !$config, 'config load failed' ); ok( $@, "error thrown ($@)" ); } + +# parse error generated on invalid config +{ + my $file = 't/invalid/conf.yml'; + my $config = eval { Config::Any->load_files( { files => [$file], use_ext => 1} ) }; + + ok( !$config, 'config load failed' ); + ok( $@, "error thrown ($@)" ); +}