Skip to content

Commit

Permalink
Test golfed from RT #128833.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Oct 19, 2016
1 parent ab4bbc6 commit dd714f8
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion S17-promise/start.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 49;
plan 50;

throws-like { await }, Exception, "a bare await should not work";

Expand Down Expand Up @@ -147,3 +147,22 @@ dies-ok { await start { fail 'oh noe' } }, 'await rethrows failures';
sleep 1;
is $*A,43,'dynamic variables modified inside start nested inside a block';
}

# RT #128833
{
grammar G {
token TOP { .+ { make ~$/ } }
}
my $warned = False;
await do for ^300 {
start {
CONTROL {
when CX::Warn {
$warned = True;
}
}
G.parse("x" x 1000)
}
}
nok $warned, 'No spurious warnings when using closures in grammar rules';
}

0 comments on commit dd714f8

Please sign in to comment.