| 1 |
#!/usr/bin/perl -T |
| 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 => 2; |
| 10 |
use File::Spec; |
| 11 |
use Scalar::Util qw(tainted); |
| 12 |
|
| 13 |
use Config::IniFiles; |
| 14 |
|
| 15 |
my $filename = File::Spec->catfile( File::Spec->curdir(), "t", "array.ini", ); |
| 16 |
|
| 17 |
{ |
| 18 |
my $cfg = Config::IniFiles->new( |
| 19 |
-file => $filename, |
| 20 |
-default => "Common", |
| 21 |
-nocase => 1, |
| 22 |
); |
| 23 |
|
| 24 |
my @val = $cfg->val( "Sect", "Par" ); |
| 25 |
|
| 26 |
# TEST |
| 27 |
ok( !tainted( $val[0] ), "val[0] is not tainted" ); |
| 28 |
|
| 29 |
# TEST |
| 30 |
ok( !tainted( $val[1] ), "val[1] is not tainted" ); |
| 31 |
} |
| 32 |
|