diff options
author | Patrick Spek <p.spek@tyil.nl> | 2017-04-24 00:11:31 +0200 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2017-04-24 00:11:31 +0200 |
commit | 4719fa27d8a3de7e75162cdcc48c682e0c6affbc (patch) | |
tree | 9e48b90fb2acc9964f21a5db7b97afbe23a41a8d /t/getting.t | |
parent | 852000b04805e0c12cc0552859311c5e9c884f69 (diff) |
Add test descriptions
Diffstat (limited to 't/getting.t')
-rw-r--r-- | t/getting.t | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/t/getting.t b/t/getting.t index 9d0cc5c..e4339bb 100644 --- a/t/getting.t +++ b/t/getting.t @@ -17,10 +17,12 @@ $config.read({ } }); -ok $config.get("a") eq "a"; -ok $config.get("b.c") eq "c"; -ok $config.get("nonexistant") === Nil; +ok $config.get("a") eq "a", "Get simple key"; +ok $config.get("b.c") eq "c", "Get nested key"; +ok $config.get("nonexistant") === Nil, "Get nonexistant key"; +ok $config.get("nonexistant", "test") === Nil, "Get nonexistant key with default"; -ok $config.get(["a"]) eq "a"; -ok $config.get(["b", "c"]) eq "c"; -ok $config.get(["nonexistant"]) === Nil; +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") === Nil, "Get nonexistant key by array with default"; |