aboutsummaryrefslogtreecommitdiff
path: root/t/04-setting.t
diff options
context:
space:
mode:
Diffstat (limited to 't/04-setting.t')
-rw-r--r--t/04-setting.t16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/04-setting.t b/t/04-setting.t
new file mode 100644
index 0000000..7e3a457
--- /dev/null
+++ b/t/04-setting.t
@@ -0,0 +1,16 @@
+#! /usr/bin/env perl6
+
+use v6.c;
+use Test;
+use lib "lib";
+
+plan 4;
+
+use Config;
+
+my $config = Config.new();
+
+ok $config.set("a", "test").get("a") eq "test", "Setting simple key";
+ok $config.set("b.c", "test").get("b.c") eq "test", "Setting nested key";
+ok $config.set(["d"], "test").get("d") eq "test", "Setting simple key using array";
+ok $config.set(["e", "f"], "test").get("e.f") eq "test", "Setting nested key using array";