Permalink
Browse files

tests for RT #73680

  • Loading branch information...
moritz committed Oct 25, 2011
1 parent 5444422 commit 87785c08317bf0665ca0436d95ec05f18f4fd675
Showing with 7 additions and 2 deletions.
  1. +7 −2 S05-grammar/methods.t
View
@@ -1,7 +1,7 @@
use v6;
use Test;
-plan 3;
+plan 5;
grammar WithMethod {
rule TOP { 'lorem' | <.panic> }
@@ -21,4 +21,9 @@ grammar WithOuterLex {
WithOuterLex.parse('xxx');
is $x, 42, 'regex in a grammar can see outer lexicals';
-done;
+grammar WithAttrib {
+ has Str $.sep;
+}
+# RT #73680
+is WithAttrib.new(sep => ',').sep, ',', 'attributes work in grammars too';
+isa_ok WithAttrib.new.sep, Str, 'empty attribute intilized to Str';

0 comments on commit 87785c0

Please sign in to comment.