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=0d546cb98e3d19c48f877ecb8a793af1d83f864c;hp=45fd66e805ff48a600267cdb46b95245bd5cac48;hb=1afb249c67eda203b13fef661fd046bff0ee26cc;hpb=bb941906c239836c60ecce6d451cd896898f1efd diff --git a/t/54-xml.t b/t/54-xml.t index 45fd66e..0d546cb 100644 --- a/t/54-xml.t +++ b/t/54-xml.t @@ -2,13 +2,14 @@ use strict; use warnings; use Test::More; +use Config::Any; use Config::Any::XML; if ( !Config::Any::XML->is_supported ) { plan skip_all => 'XML format not supported'; } else { - plan tests => 6; + plan tests => 8; } { @@ -39,3 +40,13 @@ SKIP: { ok( $config, 'config loaded' ); ok( !$@, 'no error thrown' ); } + +# parse error generated on invalid config +{ + my $file = 't/invalid/conf.xml'; + my $config = eval { Config::Any->load_files( { files => [$file], use_ext => 1} ) }; + + ok( !$config, 'config load failed' ); + ok( $@, "error thrown ($@)" ); +} +