### ----------------------------------------------------
### -- Logger
### -- Licenses: Artistic-2.0
### -- Authors: André Brás
### -- File: t/04-clone.t
### ----------------------------------------------------
#!/usr/bin/env raku

use Test;
use Logger;

my $log   = Logger.new;
$log.ndc.push('dummy');
$log.mdc.put('dummy', 1.Str);

my $clone = $log.clone;

isnt($clone.WHERE, $log.WHERE, 'log different memory address');

is($clone.pattern, $log.pattern, 'log same pattern');
is($clone.output, $log.output, 'log same output');
is($clone.level, $log.level, 'log same level');

is-deeply($clone.mdc.Hash, $log.mdc.Hash, 'mdc same elements');
is-deeply($clone.ndc.Array, $log.ndc.Array, 'ndc same elements');

done-testing;


