aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2017-07-29 02:14:53 +0200
committerPatrick Spek <p.spek@tyil.nl>2017-07-29 02:14:53 +0200
commit841aaaf5c04096c69572d7441ddce8c585ba06d5 (patch)
tree2b55fb803ddbd11c90b9b611400b89ad5735cf60
parent145948b134c3fc8b91543e4c1b24b50764b24d8b (diff)
Add tests for associative indexing
-rw-r--r--t/02-getting.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/02-getting.t b/t/02-getting.t
index 06a345a..de7689a 100644
--- a/t/02-getting.t
+++ b/t/02-getting.t
@@ -4,7 +4,7 @@ use v6.c;
use Test;
use lib "lib";
-plan 8;
+plan 11;
use Config;
@@ -26,3 +26,7 @@ ok $config.get(["a"]) eq "a", "Get simple key by array";
ok $config.get(["b", "c"]) eq "c", "Get nested key by array";
ok $config.get(["nonexistant"]) === Nil, "Get nonexistant key by array";
ok $config.get(["nonexistant"], "test") === "test", "Get nonexistant key by array with default";
+
+ok $config.<a> eq "a", "Get simple key via associative index";
+ok $config.<b.c> eq "c", "Get nested key via associative index";
+ok $config.<nonexistant> === Nil, "Get nonexistant key via associative index";