File: 05-delete.t

package info (click to toggle)
libconfig-onion-perl 1.007-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 200 kB
  • sloc: perl: 151; makefile: 12
file content (20 lines) | stat: -rw-r--r-- 428 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use strict;
use warnings;

use Test::Exception;
use Test::More;

use Config::Onion;

use FindBin;
my $conf_dir = $FindBin::Bin . '/conf';

# GH12: delete hash element by overwriting with !DELETE!
{
  my $cfg = Config::Onion->set_default(foo => { bar => 'test', rest => 'ok' });
  $cfg->set_override(foo => { bar => '!DELETE!' });
  is_deeply($cfg->cfg, { foo => { rest => 'ok' }}, 'key deleted successfully');
}

done_testing;