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=2eb8d4e5bb91a2f28b73b39d36beacf95c663bca;hb=1afb249c67eda203b13fef661fd046bff0ee26cc;hpb=77f14cda81a1985461745614ec79a76d25f13ac4 diff --git a/t/55-yaml.t b/t/55-yaml.t index 2eb8d4e..b6d1f9e 100644 --- a/t/55-yaml.t +++ b/t/55-yaml.t @@ -1,14 +1,16 @@ use strict; 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; } { @@ -23,5 +25,14 @@ else { my $config = eval { Config::Any::YAML->load( $file ) }; ok( !$config, 'config load failed' ); - ok( $@, "error thrown ($@)" ); + 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 ($@)" ); }