aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--META6.json2
-rw-r--r--t/02-empty-source.t28
2 files changed, 29 insertions, 1 deletions
diff --git a/META6.json b/META6.json
index 93f0e07..793ba52 100644
--- a/META6.json
+++ b/META6.json
@@ -1,7 +1,7 @@
{
"perl": "6",
"name": "Hash::Merge",
- "version": "1.0.0",
+ "version": "0.1.0",
"auth": "github:scriptkitties",
"description": "Module to add deep merge functionality to Hashes",
"license": "Artistic-2.0",
diff --git a/t/02-empty-source.t b/t/02-empty-source.t
new file mode 100644
index 0000000..684a98b
--- /dev/null
+++ b/t/02-empty-source.t
@@ -0,0 +1,28 @@
+#! /usr/bin/env perl6
+
+use v6.c;
+use lib 'lib';
+use Test;
+
+plan 2;
+
+use Hash::Merge;
+
+my Hash $hash = {
+ a => "a",
+ b => {
+ c => "c"
+ }
+};
+
+my Hash $empty = {};
+
+$empty.merge($hash);
+
+is-deeply $empty, $hash, "Merge into empty hash";
+
+my Hash $nil;
+
+$nil.merge($hash);
+
+is-deeply $nil, $hash, "Merge into uninitialized hash";