From 841aaaf5c04096c69572d7441ddce8c585ba06d5 Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Sat, 29 Jul 2017 02:14:53 +0200 Subject: Add tests for associative indexing --- t/02-getting.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 't') 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. eq "a", "Get simple key via associative index"; +ok $config. eq "c", "Get nested key via associative index"; +ok $config. === Nil, "Get nonexistant key via associative index"; -- cgit v1.1