| 1 |
#!/usr/bin/perl |
| 2 |
|
| 3 |
# This script attempts to reproduce: |
| 4 |
# https://sourceforge.net/tracker/index.php?func=detail&aid=1565180&group_id=6926&atid=106926 |
| 5 |
|
| 6 |
use strict; |
| 7 |
use warnings; |
| 8 |
|
| 9 |
use Test::More tests => 1; |
| 10 |
use File::Spec; |
| 11 |
|
| 12 |
use Config::IniFiles; |
| 13 |
|
| 14 |
my $filename = File::Spec->catfile( File::Spec->curdir(), "t", |
| 15 |
"case-sensitive-default.ini", ); |
| 16 |
|
| 17 |
{ |
| 18 |
my $cfg = Config::IniFiles->new( |
| 19 |
-file => $filename, |
| 20 |
-default => "Common", |
| 21 |
-nocase => 1, |
| 22 |
); |
| 23 |
|
| 24 |
# TEST |
| 25 |
is( |
| 26 |
$cfg->val( "MyScript", "stopfile", "not defined" ), |
| 27 |
"myscript-stop", "Default section handled in nocase => 1", |
| 28 |
); |
| 29 |
} |
| 30 |
|