aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSamantha McVey <samantham@posteo.net>2017-04-24 14:49:30 -0700
committerSamantha McVey <samantham@posteo.net>2017-04-24 14:49:30 -0700
commit40d5898acdbae40c1b74370d5f007756bce4ca52 (patch)
tree48f1b7be9faae2f1e9bbc3e235708113c074433c /t
parent18e1a1ce36cbecd76f55ee46831a35849711d573 (diff)
Clean up the code some
Diffstat (limited to 't')
-rw-r--r--t/01-thing.t15
1 files changed, 10 insertions, 5 deletions
diff --git a/t/01-thing.t b/t/01-thing.t
index 9a906a7..402c157 100644
--- a/t/01-thing.t
+++ b/t/01-thing.t
@@ -5,27 +5,32 @@ use mergehash;
use Test;
my %a;
my %b;
-#%a<Z> = "orig";
-#%b<Z> = "new";
%a<b> = 1;
%b<a> = 2;
%a<y><z> = 2;
%b<y><a> = 1;
my %b-orig = %b;
my %a-orig = %a;
+
+
%a.merge(%b);
is-deeply %b, %b-orig;
is-deeply %a, {:a(2), :b(1), :y(${:a(1), :z(2)})};
+
+
%a = %a-orig;
%b = %b-orig;
%a<Z> = "orig";
%b<Z> = "new";
+%a.merge(%b);
is-deeply %a, {Z => 'new', a => 2, b => 1, y => {a => 1, z => 2}};
-say %a;
-my %z;
+
+
+my (%z, %y);
%z<y><p> = (1,2,3,4);
-my %y;
%y<y><p> = (5,4,6,7);
%z.merge(%y);
is %z, {y => {p => [1, 2, 3, 4, 5, 4, 6, 7]}}, "merges arrays";
+
+
done-testing;