X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FConfig-Any.git;a=blobdiff_plain;f=t%2F10-branches.t;h=40df34bafde1233695305b6dbf9cacc4a82f3ae3;hp=b2118764bd0c2a77750c769d57723a456fde02bd;hb=1afb249c67eda203b13fef661fd046bff0ee26cc;hpb=dcfb1d1d1a544d27a82cb174168df23abc539acb diff --git a/t/10-branches.t b/t/10-branches.t index b211876..40df34b 100644 --- a/t/10-branches.t +++ b/t/10-branches.t @@ -1,9 +1,13 @@ use strict; use warnings; +no warnings 'once'; -use Test::More tests => 10; +# use Test::Without::Module qw(YAML YAML::Syck Config::General XML::Simple JSON JSON::Syck Config::Tiny ); +use Test::More tests => 11; use_ok( 'Config::Any' ); +use_ok( 'Config::Any::YAML' ); + { my @warnings; @@ -38,11 +42,16 @@ use_ok( 'Config::Any' ); ); } -# grep out files we don't understand for these tests -my @files = grep { !m{\.(foo|unsupported)$} } glob( "t/conf/conf.*" ); +my @files = glob( "t/supported/conf.*" ); +{ + require Config::Any::General; + local $SIG{ __WARN__ } = sub { } + if Config::Any::General->is_supported; + ok( Config::Any->load_files( { files => \@files, use_ext => 0 } ), + "use_ext 0 works" ); +} + my $filter = sub { return }; -ok( Config::Any->load_files( { files => \@files, use_ext => 0 } ), - "use_ext 0 works" ); ok( Config::Any->load_files( { files => \@files, use_ext => 1 } ), "use_ext 1 works" ); @@ -61,6 +70,6 @@ eval { }; ok( $@, "filter breaks" ); -my @stems = qw(t/conf/conf); +my @stems = qw(t/supported/conf); ok( Config::Any->load_stems( { stems => \@stems, use_ext => 1 } ), "load_stems with stems works" );