X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FConfig-Any.git;a=blobdiff_plain;f=t%2F54-xml.t;h=02fd79376b35d109c6001baf20e4a4329126903d;hp=fb52d511e6cc64c981be2028bed087c8fc099a88;hb=aa7bd7c30e544ebbb418c2a0508523800e790836;hpb=5a2e0210fe5c7da046be37b4240008f2b667be67 diff --git a/t/54-xml.t b/t/54-xml.t index fb52d51..02fd793 100644 --- a/t/54-xml.t +++ b/t/54-xml.t @@ -8,7 +8,7 @@ if ( !Config::Any::XML->is_supported ) { plan skip_all => 'XML format not supported'; } else { - plan tests => 2; + plan tests => 4; } { @@ -16,3 +16,12 @@ else { ok( $config ); is( $config->{ name }, 'TestApp' ); } + +# test invalid config +{ + my $file = 't/invalid/conf.xml'; + my $config = eval { Config::Any::XML->load( $file ) }; + + ok( !$config, 'config load failed' ); + ok( $@, "error thrown ($@)" ); +}