Debian Codegraph @

t/27empty-ini.t

raw symbols SCIP
1 #!/usr/bin/perl
2 # This script is a regression test for:
3 #
4 # https://rt.cpan.org/Ticket/Display.html?id=45997
5 #
6 # Failure to read the ini file contents from a filehandle made out of a scalar
7
8 use Test::More tests => 2;
9
10 use strict;
11 use warnings;
12
13 use Config::IniFiles;
14 use File::Spec;
15
16 my $empty_fn =
17 File::Spec->catfile( File::Spec->curdir(), "t", "for-27-empty.ini" );
18
19 {
20 my $cfg = Config::IniFiles->new( -file => $empty_fn, -allowempty => 1 );
21
22 # TEST
23 ok( $cfg, "object was initialized." );
24
25 my @Groups = $cfg->GroupMembers("test");
26
27 # TEST
28 is_deeply( \@Groups, [], "Groups is empty." );
29 }