data' or dumper $copy;
isnt $kdbx, $copy, 'Clone is a different object';
isnt $kdbx->root, $copy->root,
'Clone root group is a different object';
isnt $kdbx->root->groups->[0], $
copy->root->groups->[0],
'Clone group is a different object';
isnt $kdbx->root->groups->[0]->entries->[0], $copy->root->groups->[0]->entries->[0],
'Clone entry is a different objec
tory}, 0, 'Copy excluding history has no history';
$copy = $entry->clone(new_uuid => 1);
isnt $copy->uuid, $entry->uuid, 'Entry copy with new UUID has a different UUID';
$copy = $entry->
opy added to database if clone with parent option';
my ($e1, $e2) = $kdbx->entries->each;
isnt $e1, $e2, 'Entry and its copy in the database are different objects';
is $e1->title, $e2->tit
entries->size, 6, 'Copy a group within parent doubles the number of entries in the database';
isnt $group->entries->[0]->uuid, $copy->entries->[0]->uuid,
'First entry in group and its copy
>root->groups}, 2, 'Root group has two children';
my $group1 = $kdbx->root->groups->[0];
isnt $group1->uuid, undef, 'Group 1 has a UUID';
is $group1->name, 'Internet', 'Group 1 has a name
on_id, 1, 'Group 1 has an icon';
my ($entry11, $entry12, @other) = @{$group1->entries};
isnt $entry11->uuid, undef, 'Entry has a UUID';
is $entry11->title, 'Test entry', 'Entry has a tit
ew_uuid = generate_uuid(\%uuid_set);
isnt $new_uuid, $uuid, 'Generated UUID is not in set';
$new_uuid = generate_uuid(sub { !$uuid_set{$_} });
isnt $new_uuid, $uuid, 'Generated UUID passe
is $kdbx2->version, $expected_version, sprintf('Got expected version: %x', $kdbx2->version);
isnt $kdbx2->kdf->uuid, KDF_UUID_AES, 'No unexpected KDF' if $kdbx2->version >= KDBX_VERSION_4_0;
Password', 'Default icon got changed to first icon';
my $uuid = $entry->custom_icon_uuid;
isnt $uuid, undef, 'UUID is now set';
my $found = $entry->kdbx->custom_icon_data($uuid);
is $