X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FConfig-Any.git;a=blobdiff_plain;f=t%2F20-parse.t;h=910c80baf778208fa0015a705d9f74404bf88ad7;hp=cf07aa0bfa52d40585d0444cb5b9293af2d33158;hb=3a4895023ae6455d2fdef716214e94c3e3ddfdcc;hpb=e7be073ac39914776ae469d6d1b51b666f6210d5 diff --git a/t/20-parse.t b/t/20-parse.t index cf07aa0..910c80b 100644 --- a/t/20-parse.t +++ b/t/20-parse.t @@ -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(