aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2017-07-29 02:54:19 +0200
committerPatrick Spek <p.spek@tyil.nl>2023-07-25 02:16:33 +0200
commit839e59c5bdbc5e924e469033edc52e7d2c0eeb98 (patch)
tree70fe06e4d9f64f86674e1bc677aef2787981c014 /t
parent604495ee8b686e14b1ef26eca9681aa06ce796cb (diff)
Add tests for using .get with a Nil key
Diffstat (limited to 't')
-rw-r--r--t/02-getting.t5
1 files changed, 4 insertions, 1 deletions
diff --git a/t/02-getting.t b/t/02-getting.t
index de7689a..8645607 100644
--- a/t/02-getting.t
+++ b/t/02-getting.t
@@ -4,7 +4,7 @@ use v6.c;
use Test;
use lib "lib";
-plan 11;
+plan 13;
use Config;
@@ -30,3 +30,6 @@ ok $config.get(["nonexistant"], "test") === "test", "Get nonexistant key by arra
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";
+
+is $config.get(Nil), Nil, "Attempt to .get with Nil key";
+is $config.get(Nil, "test"), "test", "Attempt .get with Nil key with default";