aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSamantha McVey <samantham@posteo.net>2017-04-24 14:44:48 -0700
committerSamantha McVey <samantham@posteo.net>2017-04-24 14:44:48 -0700
commit18e1a1ce36cbecd76f55ee46831a35849711d573 (patch)
treee9d9d88bee2f5218793aa2b867981a0a9d9a5725 /t
parent8e7a339c33e24ba8c301c3dad05db4dfeba9508c (diff)
Get array merging functionality
Diffstat (limited to 't')
-rw-r--r--t/01-thing.t13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/01-thing.t b/t/01-thing.t
index 6960a7a..9a906a7 100644
--- a/t/01-thing.t
+++ b/t/01-thing.t
@@ -16,3 +16,16 @@ 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";
+is-deeply %a, {Z => 'new', a => 2, b => 1, y => {a => 1, z => 2}};
+say %a;
+my %z;
+%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;