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=eb8e788018fe589b492238feb10c52a691b800de;hb=0d60294cccd50a91bb818ddcf1038179b89e0240;hpb=77f14cda81a1985461745614ec79a76d25f13ac4 diff --git a/t/51-ini.t b/t/51-ini.t index eb8e788..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; } { @@ -53,5 +54,14 @@ else { my $config = eval { Config::Any::INI->load( $file ) }; ok( !$config, 'config load failed' ); - ok( $@, "error thrown ($@)" ); + 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 ($@)" ); }