X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FConfig-Any.git;a=blobdiff_plain;f=t%2F53-perl.t;h=1a749a1dd346e9b6d60bdf917cb8aeffbd30c126;hp=5ad04688f0a0e8d15c2a492ad78c891709a98a8d;hb=67a1cd509bfc3f77a4fcaf42710de01597987bb0;hpb=f9f3d682a0332cec1207764dcada85a7ff7750f0 diff --git a/t/53-perl.t b/t/53-perl.t index 5ad0468..1a749a1 100644 --- a/t/53-perl.t +++ b/t/53-perl.t @@ -1,8 +1,8 @@ use strict; use warnings; -use Test::More tests => 5; - +use Test::More tests => 7; +use Config::Any; use Config::Any::Perl; { @@ -24,3 +24,12 @@ use Config::Any::Perl; ok( !$config, 'config load failed' ); ok( $@, "error thrown ($@)" ); } + +# parse error generated on invalid config +{ + my $file = 't/invalid/conf.pl'; + my $config = eval { Config::Any->load_files( { files => [$file], use_ext => 1} ) }; + + ok( !$config, 'config load failed' ); + ok( $@, "error thrown ($@)" ); +}