Browse files

[t/spec] test for RT #71514

git-svn-id: http://svn.pugscode.org/pugs@30032 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 0929b61 commit 0cb99cd85e8830ef5cc1b9ed07c17d5390be1bd1 moritz committed Mar 11, 2010
Showing with 21 additions and 1 deletion.
  1. +21 −1 S05-grammar/action-stubs.t
View
22 S05-grammar/action-stubs.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 11;
+plan 12;
# L<S05/Grammars/"and optionally pass an action object">
@@ -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.