add support for apache's IncludeOptional feature

git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@104 be1acefe-a474-0410-9a34-9b3221f2030f
This commit is contained in:
Thomas von Dein
2015-10-11 18:37:08 +00:00
parent 4484d60098
commit 6b154a6254
4 changed files with 46 additions and 15 deletions

1
t/notincluded.conf.not Normal file
View File

@@ -0,0 +1 @@
honk=NONONO

15
t/run.t
View File

@@ -8,7 +8,7 @@
use Data::Dumper;
use Test::More tests => 72;
use Test::More tests => 73;
#use Test::More qw(no_plan);
# ahem, we deliver the test code with a local copy of
@@ -462,6 +462,19 @@ is_deeply( \%C38, { bit => { one => { honk=>'bonk' },
two => { honk=>'bonk' }
} }, "Apache-style include" );
# verify fix for rt#107108, test support for IncludeOptional
my $conf38n = Config::General->new( -ConfigFile => "t/apache-include-opt.conf",
-IncludeAgain => 1, -IncludeGlob => 1,
-UseApacheInclude => 1 );
my %C38n = $conf38n->getall;
is_deeply( \%C38n, { bit => { one => { nink=>'ack' },
two => { honk=>'bonk' }
} }, "Apache-style IncludeOptional" );
#### 39 verifies bug rt#27225
# testing variable scope.
# a variable shall resolve to the value defined in the current