From 18e1a1ce36cbecd76f55ee46831a35849711d573 Mon Sep 17 00:00:00 2001 From: Samantha McVey Date: Mon, 24 Apr 2017 14:44:48 -0700 Subject: Get array merging functionality --- t/01-thing.t | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 't') 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 = "orig"; +%b = "new"; +is-deeply %a, {Z => 'new', a => 2, b => 1, y => {a => 1, z => 2}}; +say %a; +my %z; +%z

= (1,2,3,4); +my %y; +%y

= (5,4,6,7); +%z.merge(%y); +is %z, {y => {p => [1, 2, 3, 4, 5, 4, 6, 7]}}, "merges arrays"; +done-testing; -- cgit v1.1