summaryrefslogtreecommitdiff
path: root/t/01conf13.t
blob: 8913fd46ac628d942a085e9ef1aaea32d25dfbbb (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
32
33
34
35
36
37
38
39
40
41
42
# -*- perl -*-
use lib qw(t lib);
use strict;
use Test;
use TestConfig;
use Data::Dumper;

plan(tests => 2);

my %syntax = (
    load => {
	section => {
	    file => 1
	}
    },
    load => {
	section => {
	    '*' => {
		section => {
		    param => {
			section => {
			    mode => 1
			},
			mandatory => 1
		    }
		}
	    }
	}
    }
);
	

my $t = new TestConfig(lexicon => \%syntax,
		       expect => ['mandatory section [load * param] not present']);
ok($t->errors,1);
$t = new TestConfig(lexicon => \%syntax,
		    config => [
			'load.foo.param.mode' => 'rw'
		    ]);
ok($t->canonical, q{load.foo.param.mode="rw"});

	

Return to:

Send suggestions and report system problems to the System administrator.