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=47d38e7080613dce676008247d3deced8698431b;hb=HEAD;hpb=92a04e78451078b33f75e7c44d247b024c27b4f7 diff --git a/t/20-parse.t b/t/20-parse.t index 47d38e7..910c80b 100644 --- a/t/20-parse.t +++ b/t/20-parse.t @@ -1,9 +1,9 @@ package MockApp; 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; @@ -28,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(