skip xml failure tests if XML::LibXML < 1.59 is installed, it seems to parse anything...
[p5sagit/Config-Any.git] / t / 54-xml.t
index 02fd793..41376ac 100644 (file)
@@ -18,10 +18,14 @@ else {
 }
 
 # test invalid config
-{
-    my $file   = 't/invalid/conf.xml';
+SKIP: {
+    my $broken_libxml = eval { require XML::LibXML; XML::LibXML->VERSION lt '1.59'; };
+    skip 'XML::LibXML < 1.58 has issues', 2 if $broken_libxml;
+
+    local $SIG{__WARN__} = sub {}; # squash warnings from XML::Simple
+    my $file = 't/invalid/conf.xml';
     my $config = eval { Config::Any::XML->load( $file ) };
 
     ok( !$config, 'config load failed' );
-    ok( $@, "error thrown ($@)" ); 
+    ok( $@, "error thrown ($@)" );
 }