aboutsummaryrefslogtreecommitdiff
path: root/t/05-null-parser.t
blob: fc3d4b2e4ff8351ee53acd2b8e8ce4b6206272b2 (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
#! /usr/bin/env raku

use v6.c;
use Test;

use Config;
use Config::Parser::NULL;

plan 3;

Config::Parser::NULL.set-config({
    "a" => "a",
    "b" => {
        "c" => "c"
    }
});

my Config $config = Config.new;

ok $config.read('t/files/config'.IO, Config::Parser::NULL), "Attempt to read a file with Config::Parser::NULL";

is-deeply $config.get, {
    "a" => "a",
    "b" => {
        "c" => "c"
    }
}, "Check read config from Config::Parser::NULL";

ok $config.write('t/t/t'.IO, Config::Parser::NULL), "Attempt to write a file with Config::Parser::NULL";