From 0cb99cd85e8830ef5cc1b9ed07c17d5390be1bd1 Mon Sep 17 00:00:00 2001 From: moritz Date: Thu, 11 Mar 2010 09:38:54 +0000 Subject: [PATCH] [t/spec] test for RT #71514 git-svn-id: http://svn.pugscode.org/pugs@30032 c213334d-75ef-0310-aa23-eaa082d1ae64 --- S05-grammar/action-stubs.t | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/S05-grammar/action-stubs.t b/S05-grammar/action-stubs.t index c9fb8c7a94..b63cf9c81a 100644 --- a/S05-grammar/action-stubs.t +++ b/S05-grammar/action-stubs.t @@ -2,7 +2,7 @@ use v6; use Test; -plan 11; +plan 12; # L @@ -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