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=d00377bf4687d95586f01ef307f7d74458f8995a;hp=b70d7265de086886379b404b83fad2d61cae1df5;hb=df0b9676f6f1ce3441a2d2f83cdcb8cd4a952966;hpb=bef9e9a56024f417b4aa09120378d8c5d31137bc diff --git a/t/10-branches.t b/t/10-branches.t index b70d726..d00377b 100644 --- a/t/10-branches.t +++ b/t/10-branches.t @@ -1,3 +1,7 @@ +use strict; +use warnings; + +# use Test::Without::Module qw(YAML YAML::Syck Config::General XML::Simple JSON JSON::Syck Config::Tiny ); use Test::More tests => 10; use_ok( 'Config::Any' ); @@ -6,7 +10,7 @@ use_ok( 'Config::Any' ); my @warnings; local $SIG{ __WARN__ } = sub { push @warnings, @_ }; - Config::Any->load_files( ); + Config::Any->load_files(); like( shift @warnings, qr/^No files specified!/, @@ -20,7 +24,7 @@ use_ok( 'Config::Any' ); "load_files expects files" ); - Config::Any->load_stems( ); + Config::Any->load_stems(); like( shift @warnings, qr/^No stems specified!/, @@ -35,10 +39,16 @@ use_ok( 'Config::Any' ); ); } -my @files = 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" ); @@ -57,6 +67,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" );