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 43 44 45 46 47 48
|
# test shellvar backend
use Config::Model::BackendMgr;
use strict;
use warnings;
my @config_classes = ({
name => "Shelly",
element => [
[qw/foo bar/],
{
'value_type' => 'uniline',
'type' => 'leaf',
},
],
'rw_config' => {
backend => 'ShellVar',
config_dir => '/etc',
file => 'foo.conf',
}
});
my @tests = (
{ # mini (test for Debian #719256)
name => 'debian-719256',
check => [
foo => 'ok',
bar => "with space"
],
},
{
# data is written in file not using canonical order
name => 'keep-order',
file_contents_like => {
"/etc/foo.conf" => [ qr/bar="with space"\nfoo="ok"/m ] ,
}
}
);
return {
model_to_test => "Shelly",
home_for_test => '/home/joe',
conf_file_name => 'foo.conf',
conf_dir => '/etc',
config_classes => \@config_classes,
tests => \@tests
};
|