summaryrefslogtreecommitdiff
path: root/t/01conf14.t
blob: 55f9b3a18fa0d4cab17562877329221da4f04d81 (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 => { default => 0 }
			},
			mandatory => 1
		    }
		}
	    }
	}
    }
);
	

my $t = new TestConfig(lexicon => \%syntax,
		       expect => ['no section matches mandatory [load * param]']);
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.