Skip to content

Commit

Permalink
Add test for RT #116649
Browse files Browse the repository at this point in the history
  • Loading branch information
usev6 committed Feb 7, 2015
1 parent 4eb80b2 commit 4dca70c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion S03-metaops/reverse.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 37;
plan 39;

=begin pod
Expand Down Expand Up @@ -72,6 +72,17 @@ eval_dies_ok '("a" R~ "b") = 1', 'Cannot assign to return value of R~';
'adequate error message on trying to metaop-reverse binding (:=)';
}

# RT #116649
{
my $y = 5;
is $y [R/]= 1, 1/5, '[R/]= works correctly (1)';
sub r2cf(Rat $x is copy) {
gather $x [R/]= 1 while ($x -= take $x.floor) > 0
}
is r2cf(1.4142136).join(" "), '1 2 2 2 2 2 2 2 2 2 6 1 2 4 1 1 2',
'[R/]= works correctly (2)';
}

{
my $foo = "foo";
$foo [R~]= "bar";
Expand Down

0 comments on commit 4dca70c

Please sign in to comment.