mirror of
https://codeberg.org/scip/Config-General.git
synced 2025-12-16 20:21:01 +01:00
1.22: - added a new option to new(): -LowerCaseNames, which
lowercases all option-names (feature request) git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@10 be1acefe-a474-0410-9a34-9b3221f2030f
This commit is contained in:
29
t/cfg.7
29
t/cfg.7
@@ -1,27 +1,8 @@
|
||||
<cops>
|
||||
<officer randall>
|
||||
# Case insensitive block test
|
||||
|
||||
<Cops>
|
||||
<OFFICER randall>
|
||||
name stein
|
||||
age 25
|
||||
</officer>
|
||||
<officer gordon>
|
||||
name bird
|
||||
age 31
|
||||
</officer>
|
||||
</cops>
|
||||
domain b0fh.org
|
||||
domain l0pht.com
|
||||
domain infonexus.com
|
||||
message <<EOF
|
||||
yes. we are not here. you
|
||||
can reach us somewhere in
|
||||
outerspace.
|
||||
EOF
|
||||
command = ssh -f -g orpheus.0x49.org \
|
||||
-l azrael -L:34777samir.okir.da.ru:22 \
|
||||
-L:31773:shane.sol1.rocket.de:22 \
|
||||
'exec sleep 99999990'
|
||||
user = tom
|
||||
passwd = sakkra
|
||||
<db>
|
||||
host = blah.blubber
|
||||
</db>
|
||||
</copS>
|
||||
|
||||
27
t/cfg.8
Normal file
27
t/cfg.8
Normal file
@@ -0,0 +1,27 @@
|
||||
<cops>
|
||||
<officer randall>
|
||||
name stein
|
||||
age 25
|
||||
</officer>
|
||||
<officer gordon>
|
||||
name bird
|
||||
age 31
|
||||
</officer>
|
||||
</cops>
|
||||
domain b0fh.org
|
||||
domain l0pht.com
|
||||
domain infonexus.com
|
||||
message <<EOF
|
||||
yes. we are not here. you
|
||||
can reach us somewhere in
|
||||
outerspace.
|
||||
EOF
|
||||
command = ssh -f -g orpheus.0x49.org \
|
||||
-l azrael -L:34777samir.okir.da.ru:22 \
|
||||
-L:31773:shane.sol1.rocket.de:22 \
|
||||
'exec sleep 99999990'
|
||||
user = tom
|
||||
passwd = sakkra
|
||||
<db>
|
||||
host = blah.blubber
|
||||
</db>
|
||||
15
t/run.t
15
t/run.t
@@ -4,17 +4,18 @@
|
||||
# the Conf.pm source directory.
|
||||
# Under normal circumstances every test should run.
|
||||
|
||||
BEGIN { $| = 1; print "1..7\n";}
|
||||
BEGIN { $| = 1; print "1..8\n";}
|
||||
use lib "blib/lib";
|
||||
use Config::General;
|
||||
use Data::Dumper;
|
||||
print "ok\n";
|
||||
print STDERR "\n1 .. ok # loading Config::General\n";
|
||||
|
||||
foreach (2..6) {
|
||||
foreach (2..7) {
|
||||
&p("t/cfg." . $_, $_);
|
||||
}
|
||||
|
||||
my $conf = new Config::General("t/cfg.7");
|
||||
my $conf = new Config::General("t/cfg.8");
|
||||
my %hash = $conf->getall;
|
||||
$conf->save("t/cfg.out", %hash);
|
||||
|
||||
@@ -25,14 +26,14 @@ my $a = \%hash;
|
||||
my $b = \%copyhash;
|
||||
|
||||
# now see if the saved hash is still the same as the
|
||||
# one we got from cfg.7
|
||||
# one we got from cfg.8
|
||||
if (&comp($a,$b)) {
|
||||
print "ok\n";
|
||||
print STDERR "7 .. ok # Writing Config Hash to disk and compare with original\n";
|
||||
print STDERR "8 .. ok # Writing Config Hash to disk and compare with original\n";
|
||||
}
|
||||
else {
|
||||
print "7 not ok\n";
|
||||
print STDERR "7 .. not ok\n";
|
||||
print "8 not ok\n";
|
||||
print STDERR "8 .. not ok\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user