diff options
author | Patrick Spek <p.spek@tyil.nl> | 2018-08-26 13:51:54 +0200 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2018-08-26 13:51:54 +0200 |
commit | 579707dec9cba3e80e6ec5a9908c96c3695e4337 (patch) | |
tree | 395f926f7ede3e15dd404cc2c803ae6d6c10fefd /t/09-cloning.t | |
parent | dda25363d76b2a408a9c31fcb9e30c643ccbb88c (diff) |
Add .clone method
Diffstat (limited to 't/09-cloning.t')
-rw-r--r-- | t/09-cloning.t | 21 |
1 files changed, 21 insertions, 0 deletions
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 |