X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FConfig-Any.git;a=blobdiff_plain;f=t%2F51-ini.t;h=c85ab27640e1f7be04425972975f2df3835b3c2e;hp=1fea5442f091ee73868e9a118117ca176dc41829;hb=67a1cd509bfc3f77a4fcaf42710de01597987bb0;hpb=f9f3d682a0332cec1207764dcada85a7ff7750f0 diff --git a/t/51-ini.t b/t/51-ini.t index 1fea544..c85ab27 100644 --- a/t/51-ini.t +++ b/t/51-ini.t @@ -2,13 +2,14 @@ use strict; use warnings; use Test::More; +use Config::Any; use Config::Any::INI; if ( !Config::Any::INI->is_supported ) { plan skip_all => 'INI format not supported'; } else { - plan tests => 13; + plan tests => 15; } { @@ -55,3 +56,12 @@ else { ok( !$config, 'config load failed' ); ok( $@, "error thrown ($@)" ); } + +# parse error generated on invalid config +{ + my $file = 't/invalid/conf.ini'; + my $config = eval { Config::Any->load_files( { files => [$file], use_ext => 1} ) }; + + ok( !$config, 'config load failed' ); + ok( $@, "error thrown ($@)" ); +}