Changeset 22062

Show
Ignore:
Timestamp:
08/28/08 17:26:02 (3 months ago)
Author:
masak
Message:

[t/spec/S05-metasyntax/regex.t]
added tests for regex, token, and rule outside of grammars

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • t/spec/S05-metasyntax/regex.t

    r21524 r22062  
    22use Test; 
    33 
    4 plan 11; 
     4plan 14; 
    55 
    66# L<S05/Regexes are now first-class language, not strings> 
     
    4343    lives_ok({regex baz {qux}}, 'regex foo {...} is valid'); 
    4444} 
     45 
     46#?rakudo skip 'rakudo cannot handle named regexes outside of grammars' 
     47{ 
     48    regex alien { ET }; 
     49    token archaeologist { Indiana }; 
     50    rule food { pasta }; 
     51 
     52    ok( 'ET phone home' ~~ alien, 'named regex outside of a grammar works' ); 
     53    ok( 'Indiana has left the fridge' ~~ archaeologist, 
     54                                  'named token outside of a grammar works' ); 
     55    ok( 'mmm, pasta' ~~ food, 
     56                                  'named tule outside of a grammar works' ); 
     57}