prereq report test
[p5sagit/Config-Any.git] / t / 20-parse.t
index cf07aa0..910c80b 100644 (file)
@@ -3,8 +3,7 @@ use strict;
 use warnings;
 no warnings 'once';
 
-$|++;
-use Test::More tests => 54;
+use Test::More tests => 6*9;
 use Scalar::Util qw(blessed reftype);
 use Config::Any;
 use Config::Any::General;
@@ -14,8 +13,6 @@ use Config::Any::Perl;
 use Config::Any::XML;
 use Config::Any::YAML;
 
-$Config::Any::YAML::NO_YAML_XS_WARNING = 1;
-
 our %ext_map = (
     conf => 'Config::Any::General',
     ini  => 'Config::Any::INI',
@@ -31,18 +28,14 @@ sub load_parser_for {
 
     my ( $ext ) = $f =~ m{ \. ( [^\.]+ ) \z }xms;
     my $mod = $ext_map{ $ext };
-    my $mod_load_result;
-    eval {
-        $mod_load_result = $mod->load( $f );
-        delete $INC{ $f } if $ext eq 'pl';
-    };
-    return $@ ? ( 1, $mod ) : ( 0, $mod );
+    return !$mod->is_supported ? ( 1, $mod ) : ( 0, $mod );
 }
 
 for my $f ( map { "t/conf/conf.$_" } keys %ext_map ) {
     my ( $skip, $mod ) = load_parser_for( $f );
-SKIP: {
-        skip "File loading backend for $mod not found", 9 if $skip;
+    SKIP: {
+        skip "File loading backend for $mod not found", 9
+            if $skip && !$ENV{RELEASE_TESTING};
 
         ok( my $c_arr
                 = Config::Any->load_files(