Permalink
Browse files

test for loop with default value

git-svn-id: http://svn.pugscode.org/pugs@25952 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 628aa1e commit 21ee05588edd801d5c07d665f23b50ba133bef67 szabgab committed Mar 20, 2009
Showing with 11 additions and 1 deletion.
  1. +11 −1 S04-statements/for.t
View
@@ -11,7 +11,7 @@ for statement as possible
=end description
-plan 49;
+plan 50;
## No foreach
# L<S04/The C<for> statement/"no foreach statement any more">
@@ -378,6 +378,16 @@ eval_dies_ok('for(0..5) { }','keyword needs at least one whitespace after it');
is $str, " 2 12 0";
}
+#?rakudo skip 'default value in variable in for loop'
+{
+ my $str = '';
+ for 1..5 -> $x, $y = 7 {
+ $str ~= " " ~ $x*$y;
+ }
+ is $str, " 2 12 35";
+}
+
+
{
my @a = <1 2 3>;
my @b = <4 5 6>;

0 comments on commit 21ee055

Please sign in to comment.