aboutsummaryrefslogtreecommitdiff
path: root/t/03-having.t
diff options
context:
space:
mode:
Diffstat (limited to 't/03-having.t')
-rw-r--r--t/03-having.t23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/03-having.t b/t/03-having.t
new file mode 100644
index 0000000..0627ed5
--- /dev/null
+++ b/t/03-having.t
@@ -0,0 +1,23 @@
+#! /usr/bin/env perl6
+
+use v6.c;
+use Test;
+use lib "lib";
+
+plan 4;
+
+use Config;
+
+my $config = Config.new();
+
+$config.read({
+ a => "a",
+ b => {
+ c => "c"
+ }
+});
+
+ok $config.has("a"), "Check existence of simple key";
+ok $config.has("b.c"), "Check existence of nested key";
+ok $config.has(["a"]), "Check existence of simple key using array";
+ok $config.has(["b", "c"]), "Check existence of nested key using array";