diff options
author | Patrick Spek <p.spek@tyil.nl> | 2017-07-29 02:14:53 +0200 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2023-07-25 02:16:29 +0200 |
commit | dadcea865d0d48f0f851c474b1770a0c05ad0f33 (patch) | |
tree | 2b55fb803ddbd11c90b9b611400b89ad5735cf60 /t | |
parent | 72f91cc0604634b2f5025a0130d0c88bb5482615 (diff) |
Add tests for associative indexing
Diffstat (limited to 't')
-rw-r--r-- | t/02-getting.t | 6 |
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"; |