my
$sudo_validator
= Config::Augeas::Validator->new(
conf
=>
"examples/sudo.ini"
);
$sudo_validator
->play(
'fakeroot/etc/sudoers'
);
is(
$sudo_validator
->{err},
'0'
,
"Sudo test returned without error"
);
my
$sudo_fail_validator
= Config::Augeas::Validator->new(
conf
=>
"examples/sudo_fail.ini"
);
$sudo_fail_validator
->play(
'fakeroot/etc/sudoers'
);
isnt(
$sudo_fail_validator
->{err},
'0'
,
"Sudo test returned with error"
);
my
$hosts_validator
= Config::Augeas::Validator->new(
conf
=>
"examples/hosts.ini"
);
$hosts_validator
->play(
'fakeroot/etc/hosts'
);
is(
$hosts_validator
->{err},
'0'
,
"Hosts test returned without error"
);
my
$validator
= Config::Augeas::Validator->new(
rulesdir
=>
"examples"
);
$validator
->play(
'fakeroot/etc/hosts'
);
is(
$validator
->{err},
'0'
,
"rulesdir host test returned without error"
);