From 579707dec9cba3e80e6ec5a9908c96c3695e4337 Mon Sep 17 00:00:00 2001
From: Patrick Spek
Date: Sun, 26 Aug 2018 13:51:54 +0200
Subject: Add .clone method
---
t/09-cloning.t | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 t/09-cloning.t
(limited to 't/09-cloning.t')
diff --git a/t/09-cloning.t b/t/09-cloning.t
new file mode 100644
index 0000000..b13cd7d
--- /dev/null
+++ b/t/09-cloning.t
@@ -0,0 +1,21 @@
+#! /usr/bin/env perl6
+
+use v6.c;
+
+use Test;
+
+use Config;
+
+plan 2;
+
+my Config $a .= new.read: %(
+ foo => "bar",
+ baz => 42,
+);
+
+my Config $b = $a.clone;
+
+is-deeply $a.get, $b.get, "B contains the same data as A";
+isnt $a, $b, "A and B are not the same object";
+
+# vim: ft=perl6 noet
--
cgit v1.1