Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
infix x with fractional numbers
  • Loading branch information
moritz committed Oct 3, 2011
1 parent 20b8292 commit e65bacd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion S03-operators/repeat.t
Expand Up @@ -8,7 +8,7 @@ Repeat operators for strings and lists
=end description

plan 29;
plan 30;

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

Expand All @@ -18,6 +18,7 @@ is(1 x 5, '11111', 'number repeat operator works on number and creates string');
is('' x 6, '', 'repeating an empty string creates an empty string');
is('a' x 0, '', 'repeating zero times produces an empty string');
is('a' x -1, '', 'repeating negative times produces an empty string');
is 'a' x 2.2, 'aa', 'repeating with a fractional number coerces to Int';

#L<S03/Changes to Perl 5 operators/"and xx (which creates a list of repetitions of a list or item)">
my @foo = 'x' xx 10;
Expand Down

0 comments on commit e65bacd

Please sign in to comment.