Skip to content

Commit

Permalink
[t/spec] test for RT #71514
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.pugscode.org/pugs@30032 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
moritz committed Mar 11, 2010
1 parent 0929b61 commit 0cb99cd
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion S05-grammar/action-stubs.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 11;
plan 12;

# L<S05/Grammars/"and optionally pass an action object">

Expand Down Expand Up @@ -89,4 +89,24 @@ is $action.calls, 'ab', '... and in the right order';
is $match.ast, 235, 'got the right .ast';

}

# another former rakudo regression, RT #71514
{
grammar ActionsTestGrammar {
token TOP {
^ .+ $
}
}
class TestActions {
method TOP($/) {
"a\nb".subst(/\n+/, '', :g);
make 123;
}
}

is ActionsTestGrammar.parse("ab\ncd", :actions(TestActions.new)).ast, 123,
'Can call Str.subst in an action method without any trouble';
}


# vim: ft=perl6

0 comments on commit 0cb99cd

Please sign in to comment.