4 # use Test::Without::Module qw(YAML YAML::Syck Config::General XML::Simple JSON JSON::Syck Config::Tiny );
5 use Test::More tests => 10;
7 use_ok( 'Config::Any' );
11 local $SIG{ __WARN__ } = sub { push @warnings, @_ };
13 Config::Any->load_files();
16 qr/^No files specified!/,
17 "load_files expects args"
20 Config::Any->load_files( {} );
23 qr/^No files specified!/,
24 "load_files expects files"
27 Config::Any->load_stems();
30 qr/^No stems specified!/,
31 "load_stems expects args"
34 Config::Any->load_stems( {} );
37 qr/^No stems specified!/,
38 "load_stems expects stems"
42 my @files = glob( "t/supported/conf.*" );
43 ok( Config::Any->load_files( { files => \@files, use_ext => 0 } ),
46 my $filter = sub { return };
47 ok( Config::Any->load_files( { files => \@files, use_ext => 1 } ),
50 ok( Config::Any->load_files(
51 { files => \@files, use_ext => 1, filter => \&$filter }
56 Config::Any->load_files(
63 ok( $@, "filter breaks" );
65 my @stems = qw(t/supported/conf);
66 ok( Config::Any->load_stems( { stems => \@stems, use_ext => 1 } ),
67 "load_stems with stems works" );