Config-Abstraction
view release on metacpan or search on metacpan
t/edge_cases.t view on Meta::CPAN
config_dirs => [],
);
is($cfg->exists('present_undef'), 1, 'key with undef value exists');
is($cfg->exists('truly_absent'), 0, 'truly absent key does not exist');
ok(!defined($cfg->get('present_undef')), 'undef value returns undef from get()');
};
# ===========================================================================
# Unicode and special characters
# ===========================================================================
subtest 'unicode value in data preserved' => sub {
my $cfg = Config::Abstraction->new(
data => { name => $UNICODE_VALUE },
config_dirs => [],
);
is($cfg->get('name'), $UNICODE_VALUE, 'unicode value preserved');
};
subtest 'unicode key in data accessible' => sub {
my $cfg = Config::Abstraction->new(
data => { $UNICODE_VALUE => 'unicode_key_val' },
config_dirs => [],
);
is($cfg->get($UNICODE_VALUE), 'unicode_key_val', 'unicode key accessible');
};
subtest 'value containing newlines preserved' => sub {
my $cfg = Config::Abstraction->new(
data => { multiline => $NEWLINE_VALUE },
config_dirs => [],
);
is($cfg->get('multiline'), $NEWLINE_VALUE, 'newline in value preserved');
};
( run in 1.873 second using v1.01-cache-2.11-cpan-c966e8aa7e8 )