Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added tests for RT #89208
  • Loading branch information
peschwa committed Jan 26, 2014
1 parent fab066e commit 06a737b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion S04-statement-modifiers/for.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 20;
plan 21;

# L<S04/"Conditional statements"/Conditional statement modifiers work as in Perl 5>

Expand Down Expand Up @@ -114,4 +114,7 @@ eval_dies_ok '1 for <a b> for <c d>;', 'double statement-modifying for is not al
is @a.join(','), '0,1,2';
}

# RT #89208
is ((sub r { "OH HAI" })() for 5), "OH HAI", 'Anon sub in statement modifier for works.';

# vim: ft=perl6
5 changes: 4 additions & 1 deletion S04-statements/for.t
Expand Up @@ -14,7 +14,7 @@ for statement as possible
=end description

plan 77;
plan 78;

## No foreach
# L<S04/The C<for> statement/"no foreach statement any more">
Expand Down Expand Up @@ -583,4 +583,7 @@ dies_ok
is @a, [1, 2, 3, 4, 5, 6, 7, 8,9, 10, 11];
}

# RT #89208
is (for 5 { (sub { "OH HAI" })() }), "OH HAI", 'Anon sub inside for works.';

# vim: ft=perl6

0 comments on commit 06a737b

Please sign in to comment.