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=6848004d51bca8f03aa0b8a3c93d907b85c9b4d1;hp=8040d5b91b7b5e52fe56f0a15690667302098211;hb=5770ffc01feb6998b8a7e23d66b52d33e4a62b35;hpb=692fc1958052bf9e7783f424e9733efde5736aeb diff --git a/t/51-ini.t b/t/51-ini.t index 8040d5b..6848004 100644 --- a/t/51-ini.t +++ b/t/51-ini.t @@ -8,7 +8,7 @@ if ( !Config::Any::INI->is_supported ) { plan skip_all => 'INI format not supported'; } else { - plan tests => 11; + plan tests => 13; } { @@ -46,3 +46,12 @@ else { ok( $config, 'config loaded' ); is_deeply( $config, \%expected, 'subsections parsed properly' ); } + +# test invalid config +{ + my $file = 't/invalid/conf.ini'; + my $config = eval { Config::Any::INI->load( $file ) }; + + ok( !$config, 'config load failed' ); + ok( $@, "error thrown ($@)" ); +}