Skip to content

Commit

Permalink
Test exception for infix:<xx> with non-numeric Str
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Dec 7, 2016
1 parent 28c5e0d commit 5f708dc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion S03-operators/repeat.t
Expand Up @@ -8,7 +8,7 @@ Repeat operators for strings and lists
=end description

plan 54;
plan 56;

#L<S03/Changes to Perl 5 operators/"x (which concatenates repetitions of a string to produce a single string">

Expand Down Expand Up @@ -177,4 +177,12 @@ is ((2, 4, 6).Seq xx *)[^2], ((2, 4, 6), (2, 4, 6)),
is-deeply 'a' x Int, '', 'type objects get interpreted as 0 iterations';
}

# RT #130288
{
throws-like rand xx '123aaa', X::Str::Numeric,
'Failures in RHS of xx explode (callable LHS)';
throws-like 42 xx '123aaa', X::Str::Numeric,
'Failures in RHS of xx explode (Int LHS)';
}

# vim: ft=perl6

0 comments on commit 5f708dc

Please sign in to comment.