aboutsummaryrefslogtreecommitdiff
path: root/t/02-getting.t
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2017-07-29 03:04:12 +0200
committerPatrick Spek <p.spek@tyil.nl>2017-07-29 03:04:12 +0200
commitcfe2b133a952945c24879118fc5f0aed16c3c0cf (patch)
tree3dd5a63fe8bbd1d747b387e97bcbac8916924df6 /t/02-getting.t
parent3da0c917a5985db827f33988d6d74e16abd34439 (diff)
Clean up all tests
Diffstat (limited to 't/02-getting.t')
-rw-r--r--t/02-getting.t20
1 files changed, 10 insertions, 10 deletions
diff --git a/t/02-getting.t b/t/02-getting.t
index 8645607..adff4ff 100644
--- a/t/02-getting.t
+++ b/t/02-getting.t
@@ -8,7 +8,7 @@ plan 13;
use Config;
-my $config = Config.new();
+my Config $config = Config.new();
$config.read({
a => "a",
@@ -17,19 +17,19 @@ $config.read({
}
});
-ok $config.get("a") eq "a", "Get simple key";
-ok $config.get("b.c") eq "c", "Get nested key";
+is $config.get("a"), "a", "Get simple key";
+is $config.get("b.c"), "c", "Get nested key";
+is $config.get("nonexistant", "test"), "test", "Get nonexistant key with default";
ok $config.get("nonexistant") === Nil, "Get nonexistant key";
-ok $config.get("nonexistant", "test") === "test", "Get nonexistant key with default";
-ok $config.get(["a"]) eq "a", "Get simple key by array";
-ok $config.get(["b", "c"]) eq "c", "Get nested key by array";
+is $config.get(["a"]), "a", "Get simple key by array";
+is $config.get(["b", "c"]), "c", "Get nested key by array";
+is $config.get(["nonexistant"], "test"), "test", "Get nonexistant key by array with default";
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";
+is $config.<a>, "a", "Get simple key via associative index";
+is $config.<b.c>, "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";
+ok $config.get(Nil) === Nil, "Attempt to .get with Nil key";