blob: 88379894e560fee943aba98972eeeb9f5f7c2ed8 (
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
29
30
|
#! /usr/bin/env perl6
use v6.c;
use Test;
use lib "lib";
plan 8;
use Config;
my $config = Config.new;
$config.read: %(
a => "b",
c => %(
d => "e",
),
);
dd $config.get();
ok $config<a>:exists, "'a' exists";
ok $config<a>:delete, "'a' gets deleted";
nok $config<a>:exists, "'a' no longer exists";
ok $config<c>:exists, "'c' remains untouched";
ok $config.has("c.d"), "'c.d' exists";
ok $config.unset("c.d"), "'c.d' gets deleted";
nok $config.has("c.d"), "'c.d' no longer exists";
ok $config.has("c"), "'c' still exists";
|