Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add tests for RT #125109
  • Loading branch information
usev6 committed Oct 24, 2015
1 parent e8fd9d2 commit 25daf16
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion S12-attributes/clone.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 39;
plan 41;

# L<S12/Cloning/You can clone an object, changing some of the attributes:>
class Foo {
Expand Down Expand Up @@ -144,4 +144,13 @@ is($val2, 42, '... cloned object has proper attr value');

lives-ok { Int.clone }, 'cloning a type object does not explode';

# RT #125109
{
my @a = 42;
lives-ok { try { @a.clone } }, 'calling .clone on array does not die';
my @b = @a.clone;
@a.push: 44;
is @b, <42>, '.clone on array @a works as expected';
}

# vim: ft=perl6

0 comments on commit 25daf16

Please sign in to comment.