mirror of
https://codeberg.org/scip/Config-General.git
synced 2025-12-16 20:21:01 +01:00
2.43
- fixed rt.cpan.org#40925, $indichar replaced by internal configuration variable EOFseparator, which contains a 256 bit SHA checksum of the date I fixed the bug. This will prevent future conflicts hopefully. In addition it makes it possible to make it customizable, if neccessary, in a future release. - fixed rt.cpan.org#42721, return undef for empty values - fixed rt.cpan.org#42331, return undef for empty objects - fixed rt.cpan.org#44600, comments after blockname causes parser failure. - fixed rt.cpan.org#42287, whitespace at beginning or end of a quoted value gets lost after save(). - fixed rt.cpan.org#46184, variables that were not previously defined are deleted when -InterPolateEnv is enabled. - fixed bug in config loader for FileHandle objects, it supports now any compatible object. Hint by Ingo Schmiegel. - applied spelling- and speedup patches by Ville Skyttä. - applied documentation patch by Jordan Macdonald. git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@69 be1acefe-a474-0410-9a34-9b3221f2030f
This commit is contained in:
18
t/run.t
18
t/run.t
@@ -8,7 +8,7 @@
|
||||
|
||||
|
||||
use Data::Dumper;
|
||||
use Test::More tests => 50;
|
||||
use Test::More tests => 51;
|
||||
#use Test::More qw(no_plan);
|
||||
|
||||
# ahem, we deliver the test code with a local copy of
|
||||
@@ -123,6 +123,18 @@ else {
|
||||
fail("Testing variable interpolation");
|
||||
}
|
||||
|
||||
### 16.a
|
||||
# testing variable interpolation with %ENV use
|
||||
my $env = "/home/theunexistent";
|
||||
$ENV{HOME} = $env;
|
||||
my $conf16a = new Config::General(-ConfigFile => "t/cfg.16a", -InterPolateVars => 1, -InterPolateEnv => 1, -StrictVars => 0);
|
||||
my %h16a = $conf16a->getall();
|
||||
if($h16a{etc}->{log} eq "$env/log/logfile") {
|
||||
pass("Testing environment variable interpolation");
|
||||
}
|
||||
else {
|
||||
fail("Testing environment variable interpolation");
|
||||
}
|
||||
|
||||
|
||||
### 17
|
||||
@@ -291,7 +303,7 @@ TEST
|
||||
);
|
||||
my %h26 = $conf26->getall;
|
||||
my %expected_h26 = (
|
||||
foo => { 0 => { 0 => '' } },
|
||||
foo => { 0 => { 0 => undef } },
|
||||
);
|
||||
is_deeply(\%h26, \%expected_h26, "testing 0-values in block names");
|
||||
|
||||
@@ -405,7 +417,7 @@ my %conf35 = Config::General::ParseConfig(
|
||||
-SplitDelimiter => '\s*::\s*'
|
||||
);
|
||||
my %expect35 = (
|
||||
'var3 = gamma' => '',
|
||||
'var3 = gamma' => undef,
|
||||
'var1' => 'alpha',
|
||||
'var2' => 'beta'
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user