Permalink
Browse files

add test for RT#113552

  • Loading branch information...
1 parent e776b42 commit 7be1983253a62ca9508f91a80a604141aba5e3b6 @coke coke committed Jan 15, 2014
Showing with 8 additions and 1 deletion.
  1. +8 −1 S05-grammar/methods.t
View
@@ -1,7 +1,7 @@
use v6;
use Test;
-plan 5;
+plan 6;
grammar WithMethod {
rule TOP { 'lorem' | <.panic> }
@@ -27,3 +27,10 @@ grammar WithAttrib {
# RT #73680
is WithAttrib.new(sep => ',').sep, ',', 'attributes work in grammars too';
isa_ok WithAttrib.new.sep, Str, 'empty attribute intilized to Str';
+
+# RT #113552
+{
+ try { EVAL 'grammar A { token a { ... }; token a { ... } }' };
+ my $error = ~$!;
+ ok $error ~~ / 'already has a Regex \'a\'' /, "duplicate methods err sanely";
+}

0 comments on commit 7be1983

Please sign in to comment.