summaryrefslogtreecommitdiff
path: root/t/01conf12.t
blob: 8c0655b9ca371fb516b54b8de4b0c423cc6eb76d (plain)
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
26
27
28
29
30
31
# -*- perl -*-
use lib qw(t lib);
use strict;
use Test;
use TestConfig;
use Data::Dumper;

plan(tests => 1);

my $t = new TestConfig(
    config => [
	base => '/etc',
	'core.file' => 'passwd',
	'core.home' => '/home',
	
	'file.passwd.mode' => '0644',
	'file.passwd.root.uid' => 0,
	'file.passwd.root.dir' => '/root',

	'core.group' => 'group'
    ]);

print $t->canonical,"\n";
ok(Data::Dumper->new([$t->as_hash])
          ->Sortkeys(1)
          ->Useqq(1)
          ->Terse(1)
          ->Indent(0)
          ->Dump,
   '{"base" => "/etc","core" => {"file" => "passwd","group" => "group","home" => "/home"},"file" => {"passwd" => {"mode" => "0644","root" => {"dir" => "/root","uid" => 0}}}}');

Return to:

Send suggestions and report system problems to the System administrator.