File: 09-hashes.t

package info (click to toggle)
libconfig-scoped-perl 0.12-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 752 kB
  • ctags: 73
  • sloc: perl: 10,347; makefile: 42
file content (25 lines) | stat: -rw-r--r-- 427 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# vim: cindent ft=perl sm sw=4

use warnings;
use strict;

use Test::More tests => 3;

BEGIN { use_ok('Config::Scoped') }
my ( $p, $cfg );
isa_ok( $p = Config::Scoped->new(), 'Config::Scoped' );

my $text = <<'eot';
hash = {
    a=b;
    %warnings param off;
    a= {
	a=c
    }
}
eot

my $expected = { '_GLOBAL' => { 'hash' => { 'a' => { 'a' => 'c' } } } };

is_deeply( $p->parse( text => $text ), $expected, 'hash tests' );