ensure XML loader's _coerce() method checks specifically for HASH refs
[p5sagit/Config-Any.git] / t / 54-xml.t
index e2badee..45fd66e 100644 (file)
@@ -8,7 +8,7 @@ if ( !Config::Any::XML->is_supported ) {
     plan skip_all => 'XML format not supported';
 }
 else {
-    plan tests => 4;
+    plan tests => 6;
 }
 
 {
@@ -30,3 +30,12 @@ SKIP: {
     ok( !$config, 'config load failed' );
     ok( $@,       "error thrown ($@)" );
 }
+
+# test conf file with array ref
+{
+    my $file = 't/conf/conf_arrayref.xml';
+    my $config = eval { Config::Any::XML->load( $file ) };
+
+    ok( $config, 'config loaded' );
+    ok( !$@,     'no error thrown' );
+}