Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[t/spec] tests for RT #73400 Cannot loop over Capture object in Rakudo

git-svn-id: http://svn.pugscode.org/pugs@31503 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit 2d495bfe6215e3b18d73a11ad4ff1d2dc98462c5 1 parent 0037c0e
bbkr authored
Showing with 10 additions and 1 deletion.
  1. +10 −1 S04-statements/for_with_only_one_item.t
View
11 S04-statements/for_with_only_one_item.t
@@ -6,7 +6,7 @@ use Test;
# Test primarily aimed at PIL2JS
-plan 8;
+plan 9;
# sanity tests
{
@@ -75,4 +75,13 @@ plan 8;
is $count, 1, 'for $arrayref {...} executes the loop body only once';
}
+# RT #73400
+{
+ my $capture = \[1,2,3];
+ my $count = 0;
+ for $capture { $count++ }
+
+ is $count, 1, 'for $capture {...} executes the loop body only once';
+}
+
# vim: ft=perl6
Please sign in to comment.
Something went wrong with that request. Please try again.