blob: 91fcb257a0b1aab5b775ba749c1de2eac249d3af (
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'
],
parameters => \%keywords);
ok($t->get('file'), '/etc/passwd');
ok($t->get('index'), 0);
|