~ubuntu-branches/ubuntu/natty/libconfig-inifiles-perl/natty-updates

« back to all changes in this revision

Viewing changes to t/21multiline-values-in-tied.t

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2009-05-31 14:54:35 UTC
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20090531145435-qhm9d2a09lz0qdbs
Tags: upstream-2.49
ImportĀ upstreamĀ versionĀ 2.49

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/perl
2
 
 
3
 
# This script attempts to reproduce:
4
 
# https://rt.cpan.org/Ticket/Display.html?id=34067
5
 
#
6
 
# #34067: Multiline values returned as ARRAYs in tied hash interface
7
 
 
8
 
use Test::More tests => 1;
9
 
 
10
 
use strict;
11
 
use warnings;
12
 
 
13
 
use File::Spec;
14
 
 
15
 
use Config::IniFiles;
16
 
 
17
 
{
18
 
    tie my %ini, 'Config::IniFiles',
19
 
        (-file => File::Spec->catfile(File::Spec->curdir(), 't', 'array.ini'))
20
 
        ;
21
 
 
22
 
    # TEST
23
 
    is_deeply(
24
 
        scalar($ini{Sect}{Par}),
25
 
        ("1" . $/ . "2" . $/. "3"),
26
 
        "Multiline values accesed through hash returned as a single value",
27
 
    );
28
 
}