summaryrefslogtreecommitdiff
path: root/t/01conf10.t
blob: a30f7846bdc34ac533f8d9f031924624d0bb496f (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
# -*- perl -*-
use lib qw(t lib);
use strict;
use Test;
use TestConfig;

plan(tests => 2);

my %keywords = (
    base => { mandatory => 1 },
    file => { default => sub {
	my $self = shift;
	return $self->get('base') . '/passwd';
      }
    },
    index => {
	default => 0
    }
);

my $t = new TestConfig(
    config => [
	base => '/etc'
    ],
    lexicon => \%keywords);
ok($t->get('file'), '/etc/passwd');
ok($t->get('index'), 0);

Return to:

Send suggestions and report system problems to the System administrator.