Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' of https://github.com/perl6/roast
  • Loading branch information
lizmat committed Jul 9, 2014
2 parents 89c59e3 + 030b17a commit 16320f1
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 4 deletions.
2 changes: 1 addition & 1 deletion S03-metaops/reduce.t
Expand Up @@ -171,7 +171,7 @@ L<"http://groups.google.de/group/perl.perl6.language/msg/bd9eb275d5da2eda">

# Following two tests taken verbatim from former t/operators/reduce.t
lives_ok({my @foo = [1..3] >>+<< [1..3] >>+<< [1..3]},'Sanity Check');
#?rakudo todo 'reduced hyper op'

#?niecza todo 'These are hyperop tests!'
lives_ok({my @foo = [>>+<<] ([1..3],[1..3],[1..3])},'Parse [>>+<<]');

Expand Down
18 changes: 17 additions & 1 deletion S03-operators/assign.t
Expand Up @@ -6,7 +6,7 @@ use Test;
# V
# L<S03/Changes to Perl 5 operators/list assignment operator now parses on the right>

plan 290;
plan 296;


# tests various assignment styles
Expand Down Expand Up @@ -589,6 +589,22 @@ my @p;
is(@p[1],9, "~>= operator parses as item assignment 2");
}

{
my $x = 42;
@p = $x [+]= 6, 7;
is($x, 48, '[+]= operator (just like +=)');
is(@p[0],48, "[+]= operator parses as item assignment 1");
is(@p[1],7, "[+]= operator parses as item assignment 2");
}

{
my $x = 42;
@p = $x [[+]]= 6, 7;
is($x, 48, '[[+]]= operator (just like +=)');
is(@p[0],48, "[[+]]= operator parses as item assignment 1");
is(@p[1],7, "[[+]]= operator parses as item assignment 2");
}

# Tests of dwimming scalar/listiness of lhs

sub l () { 1, 2 };
Expand Down
11 changes: 10 additions & 1 deletion S12-attributes/class.t
Expand Up @@ -11,7 +11,7 @@ Class Attributes
#L<S12/Class attributes/"Class attributes are declared">
#L<S12/Class methods/Such a metaclass method is always delegated>

plan 25;
plan 26;

class Foo {
our $.bar = 23;
Expand Down Expand Up @@ -80,6 +80,15 @@ dies_ok {$test5 = Quux.bar}, 'class attribute accessor hidden by accessor in sub
is($y.x, 42, "class attributes shared by all instances");
}

# RT#122087
{
class Woof {
my $.x = 'yap';
}
my $x = Woof.new();
is($x.x, 'yap', "class attribute initialization works");
}

# RT #57336
#?niecza skip 'Exception'
{
Expand Down
2 changes: 1 addition & 1 deletion S29-context/eval.t
Expand Up @@ -59,7 +59,7 @@ dies_ok({EVAL {; 42} }, 'block EVAL is gone');
'EVAL works inside instance methods, with outer lexicals';
}

#?rakudo skip 'EVAL(Buf)'
#?rakudo skip 'EVAL(Buf) RT #122256'
#?niecza skip 'Unable to resolve method encode in class Str'
#?pugs skip 'encode'
is EVAL("'møp'".encode('UTF-8')), 'møp', 'EVAL(Buf)';
Expand Down

0 comments on commit 16320f1

Please sign in to comment.