Changeset 22457 for t

Show
Ignore:
Timestamp:
09/29/08 22:43:11 (2 months ago)
Author:
moritz
Message:

[t/spec] <?noncapturing> is now <.noncapturing> (in stdrules.t)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • t/spec/S05-mass/stdrules.t

    r22456 r22457  
    2424ok("abc1_2" ~~ m/^ <ident> $/, '<ident>'); 
    2525is($/<ident>, 'abc1_2', 'Captured <ident>'); 
    26 ok("abc1_2" ~~ m/^ <?ident> $/, '<?ident>'); 
    27 ok(!defined($/<ident>), 'Uncaptured <?ident>'); 
    28 ok(!( "7abc1_2" ~~ m/^ <?ident> $/ ), 'not <?ident>'); 
    29  
    30 ok("\t \n\t" ~~ m/^ <?ws> $/, '<?ws>'); 
    31 ok(!defined($/<ws>), 'Uncaptured <?ws>'); 
    32 ok(!( "7abc1_2" ~~ m/^ <?ws> $/ ), 'not <?ws>'); 
    33  
    34 ok(" " ~~ m/^ <?sp> $/, '<?sp>'); 
    35 ok(!defined($/<sp>), 'Uncaptured <?sp>'); 
    36 ok(!( "7abc1_2" ~~ m/<?sp>/ ), 'not <?sp>'); 
     26ok("abc1_2" ~~ m/^ <.ident> $/, '<.ident>'); 
     27ok(!defined($/<ident>), 'Uncaptured <.ident>'); 
     28ok(!( "7abc1_2" ~~ m/^ <.ident> $/ ), 'not <.ident>'); 
     29 
     30ok("\t \n\t" ~~ m/^ <.ws> $/, '<.ws>'); 
     31ok(!defined($/<ws>), 'Uncaptured <.ws>'); 
     32ok(!( "7abc1_2" ~~ m/^ <.ws> $/ ), 'not <.ws>'); 
     33 
     34ok(" " ~~ m/^ <.sp> $/, '<.sp>'); 
     35ok(!defined($/<sp>), 'Uncaptured <.sp>'); 
     36ok(!( "7abc1_2" ~~ m/<.sp>/ ), 'not <.sp>'); 
    3737 
    3838ok(" \t\t \t" ~~ m/^ (\h+) $/, '\h'); 
     
    4646# alpha 
    4747 
    48 ok("A" ~~ m/^<?alpha>$/, q{Match alpha as subrule}); 
     48ok("A" ~~ m/^<.alpha>$/, q{Match alpha as subrule}); 
    4949ok(!( "A" ~~ m/^<!alpha>.$/ ), q{Don't match negated alpha as subrule} ); 
    5050ok(!( "A" ~~ m/^<-alpha>$/ ), q{Don't match inverted alpha as subrule} ); 
    51 ok(!( "\x07"  ~~ m/^<?alpha>$/ ), q{Don't match unrelated alpha as subrule} ); 
     51ok(!( "\x07"  ~~ m/^<.alpha>$/ ), q{Don't match unrelated alpha as subrule} ); 
    5252ok("\x07"  ~~ m/^<!alpha>.$/, q{Match unrelated negated alpha as subrule}); 
    5353ok("\x07"  ~~ m/^<-alpha>$/, q{Match unrelated inverted alpha as subrule}); 
     
    6363# space 
    6464 
    65 ok("\x[9]" ~~ m/^<?space>$/, q{Match space as subrule}); 
     65ok("\x[9]" ~~ m/^<.space>$/, q{Match space as subrule}); 
    6666ok(!( "\x[9]" ~~ m/^<!space>.$/ ), q{Don't match negated space as subrule} ); 
    6767ok(!( "\x[9]" ~~ m/^<-space>$/ ), q{Don't match inverted space as subrule} ); 
    68 ok(!( "("  ~~ m/^<?space>$/ ), q{Don't match unrelated space as subrule} ); 
     68ok(!( "("  ~~ m/^<.space>$/ ), q{Don't match unrelated space as subrule} ); 
    6969ok("("  ~~ m/^<!space>.$/, q{Match unrelated negated space as subrule}); 
    7070ok("("  ~~ m/^<-space>$/, q{Match unrelated inverted space as subrule}); 
     
    8181# digit 
    8282 
    83 ok("0" ~~ m/^<?digit>$/, q{Match digit as subrule}); 
     83ok("0" ~~ m/^<.digit>$/, q{Match digit as subrule}); 
    8484ok(!( "0" ~~ m/^<!digit>.$/ ), q{Don't match negated digit as subrule} ); 
    8585ok(!( "0" ~~ m/^<-digit>$/ ), q{Don't match inverted digit as subrule} ); 
    86 ok(!( "\x[C]"  ~~ m/^<?digit>$/ ), q{Don't match unrelated digit as subrule} ); 
     86ok(!( "\x[C]"  ~~ m/^<.digit>$/ ), q{Don't match unrelated digit as subrule} ); 
    8787ok("\x[C]"  ~~ m/^<!digit>.$/, q{Match unrelated negated digit as subrule}); 
    8888ok("\x[C]"  ~~ m/^<-digit>$/, q{Match unrelated inverted digit as subrule}); 
     
    9999# alnum 
    100100 
    101 ok("n" ~~ m/^<?alnum>$/, q{Match alnum as subrule}); 
     101ok("n" ~~ m/^<.alnum>$/, q{Match alnum as subrule}); 
    102102ok(!( "n" ~~ m/^<!alnum>.$/ ), q{Don't match negated alnum as subrule} ); 
    103103ok(!( "n" ~~ m/^<-alnum>$/ ), q{Don't match inverted alnum as subrule} ); 
    104 ok(!( '{'  ~~ m/^<?alnum>$/ ), q{Don't match unrelated alnum as subrule} ); 
     104ok(!( '{'  ~~ m/^<.alnum>$/ ), q{Don't match unrelated alnum as subrule} ); 
    105105ok('{'  ~~ m/^<!alnum>.$/, q{Match unrelated negated alnum as subrule}); 
    106106ok('{'  ~~ m/^<-alnum>$/, q{Match unrelated inverted alnum as subrule}); 
     
    119119 
    120120# Unspecced 
    121 # ok("+" ~~ m/^<?ascii>$/, q{Match ascii as subrule}); 
     121# ok("+" ~~ m/^<.ascii>$/, q{Match ascii as subrule}); 
    122122# ok(!( "+" ~~ m/^<!ascii>.$/ ), q{Don't match negated ascii as subrule} ); 
    123123# ok(!( "+" ~~ m/^<-ascii>$/ ), q{Don't match inverted ascii as subrule} ); 
     
    132132# blank 
    133133 
    134 ok("\x[9]" ~~ m/^<?blank>$/, q{Match blank as subrule}); 
     134ok("\x[9]" ~~ m/^<.blank>$/, q{Match blank as subrule}); 
    135135ok(!( "\x[9]" ~~ m/^<!blank>.$/ ), q{Don't match negated blank as subrule} ); 
    136136ok(!( "\x[9]" ~~ m/^<-blank>$/ ), q{Don't match inverted blank as subrule} ); 
    137 ok(!( "&"  ~~ m/^<?blank>$/ ), q{Don't match unrelated blank as subrule} ); 
     137ok(!( "&"  ~~ m/^<.blank>$/ ), q{Don't match unrelated blank as subrule} ); 
    138138ok("&"  ~~ m/^<!blank>.$/, q{Match unrelated negated blank as subrule}); 
    139139ok("&"  ~~ m/^<-blank>$/, q{Match unrelated inverted blank as subrule}); 
     
    150150# cntrl 
    151151 
    152 ok("\x[7F]" ~~ m/^<?cntrl>$/, q{Match cntrl as subrule}); 
     152ok("\x[7F]" ~~ m/^<.cntrl>$/, q{Match cntrl as subrule}); 
    153153ok(!( "\x[7F]" ~~ m/^<!cntrl>.$/ ), q{Don't match negated cntrl as subrule} ); 
    154154ok(!( "\x[7F]" ~~ m/^<-cntrl>$/ ), q{Don't match inverted cntrl as subrule} ); 
    155 ok(!( "="  ~~ m/^<?cntrl>$/ ), q{Don't match unrelated cntrl as subrule} ); 
     155ok(!( "="  ~~ m/^<.cntrl>$/ ), q{Don't match unrelated cntrl as subrule} ); 
    156156ok("="  ~~ m/^<!cntrl>.$/, q{Match unrelated negated cntrl as subrule}); 
    157157ok("="  ~~ m/^<-cntrl>$/, q{Match unrelated inverted cntrl as subrule}); 
     
    168168# graph 
    169169 
    170 ok("V" ~~ m/^<?graph>$/, q{Match graph as subrule}); 
     170ok("V" ~~ m/^<.graph>$/, q{Match graph as subrule}); 
    171171ok(!( "V" ~~ m/^<!graph>.$/ ), q{Don't match negated graph as subrule} ); 
    172172ok(!( "V" ~~ m/^<-graph>$/ ), q{Don't match inverted graph as subrule} ); 
    173 ok(!( "\x[7F]"  ~~ m/^<?graph>$/ ), q{Don't match unrelated graph as subrule} ); 
     173ok(!( "\x[7F]"  ~~ m/^<.graph>$/ ), q{Don't match unrelated graph as subrule} ); 
    174174ok("\x[7F]"  ~~ m/^<!graph>.$/, q{Match unrelated negated graph as subrule}); 
    175175ok("\x[7F]"  ~~ m/^<-graph>$/, q{Match unrelated inverted graph as subrule}); 
     
    186186# lower 
    187187 
    188 ok("a" ~~ m/^<?lower>$/, q{Match lower as subrule}); 
     188ok("a" ~~ m/^<.lower>$/, q{Match lower as subrule}); 
    189189ok(!( "a" ~~ m/^<!lower>.$/ ), q{Don't match negated lower as subrule} ); 
    190190ok(!( "a" ~~ m/^<-lower>$/ ), q{Don't match inverted lower as subrule} ); 
    191 ok(!( "\x[1E]"  ~~ m/^<?lower>$/ ), q{Don't match unrelated lower as subrule} ); 
     191ok(!( "\x[1E]"  ~~ m/^<.lower>$/ ), q{Don't match unrelated lower as subrule} ); 
    192192ok("\x[1E]"  ~~ m/^<!lower>.$/, q{Match unrelated negated lower as subrule}); 
    193193ok("\x[1E]"  ~~ m/^<-lower>$/, q{Match unrelated inverted lower as subrule}); 
     
    204204# print 
    205205 
    206 ok("M" ~~ m/^<?print>$/, q{Match print as subrule}); 
     206ok("M" ~~ m/^<.print>$/, q{Match print as subrule}); 
    207207ok(!( "M" ~~ m/^<!print>.$/ ), q{Don't match negated print as subrule} ); 
    208208ok(!( "M" ~~ m/^<-print>$/ ), q{Don't match inverted print as subrule} ); 
    209 ok(!( "\x[7F]"  ~~ m/^<?print>$/ ), q{Don't match unrelated print as subrule} ); 
     209ok(!( "\x[7F]"  ~~ m/^<.print>$/ ), q{Don't match unrelated print as subrule} ); 
    210210ok("\x[7F]"  ~~ m/^<!print>.$/, q{Match unrelated negated print as subrule}); 
    211211ok("\x[7F]"  ~~ m/^<-print>$/, q{Match unrelated inverted print as subrule}); 
     
    222222# punct 
    223223 
    224 ok("[" ~~ m/^<?punct>$/, q{Match punct as subrule}); 
     224ok("[" ~~ m/^<.punct>$/, q{Match punct as subrule}); 
    225225ok(!( "[" ~~ m/^<!punct>.$/ ), q{Don't match negated punct as subrule} ); 
    226226ok(!( "[" ~~ m/^<-punct>$/ ), q{Don't match inverted punct as subrule} ); 
    227 ok(!( "F"  ~~ m/^<?punct>$/ ), q{Don't match unrelated punct as subrule} ); 
     227ok(!( "F"  ~~ m/^<.punct>$/ ), q{Don't match unrelated punct as subrule} ); 
    228228ok("F"  ~~ m/^<!punct>.$/, q{Match unrelated negated punct as subrule}); 
    229229ok("F"  ~~ m/^<-punct>$/, q{Match unrelated inverted punct as subrule}); 
     
    240240# upper 
    241241 
    242 ok("A" ~~ m/^<?upper>$/, q{Match upper as subrule}); 
     242ok("A" ~~ m/^<.upper>$/, q{Match upper as subrule}); 
    243243ok(!( "A" ~~ m/^<!upper>.$/ ), q{Don't match negated upper as subrule} ); 
    244244ok(!( "A" ~~ m/^<-upper>$/ ), q{Don't match inverted upper as subrule} ); 
    245 ok(!( "\x[5F]"  ~~ m/^<?upper>$/ ), q{Don't match unrelated upper as subrule} ); 
     245ok(!( "\x[5F]"  ~~ m/^<.upper>$/ ), q{Don't match unrelated upper as subrule} ); 
    246246ok("\x[5F]"  ~~ m/^<!upper>.$/, q{Match unrelated negated upper as subrule}); 
    247247ok("\x[5F]"  ~~ m/^<-upper>$/, q{Match unrelated inverted upper as subrule}); 
     
    259259# word 
    260260# unspecced 
    261 # ok("b" ~~ m/^<?word>$/, q{Match word as subrule}); 
     261# ok("b" ~~ m/^<.word>$/, q{Match word as subrule}); 
    262262# ok(!( "b" ~~ m/^<!word>.$/ ), q{Don't match negated word as subrule} ); 
    263263# ok(!( "b" ~~ m/^<-word>$/ ), q{Don't match inverted word as subrule} ); 
    264 # ok(!( '{'  ~~ m/^<?word>$/ ), q{Don't match unrelated word as subrule} ); 
     264# ok(!( '{'  ~~ m/^<.word>$/ ), q{Don't match unrelated word as subrule} ); 
    265265# ok('{'  ~~ m/^<!word>.$/, q{Match unrelated negated word as subrule} ); 
    266266# ok('{'  ~~ m/^<-word>$/, q{Match unrelated inverted word as subrule}); 
     
    277277# xdigit 
    278278 
    279 ok("0" ~~ m/^<?xdigit>$/, q{Match xdigit as subrule}); 
     279ok("0" ~~ m/^<.xdigit>$/, q{Match xdigit as subrule}); 
    280280ok(!( "0" ~~ m/^<!xdigit>.$/ ), q{Don't match negated xdigit as subrule} ); 
    281281ok(!( "0" ~~ m/^<-xdigit>$/ ), q{Don't match inverted xdigit as subrule} ); 
    282 ok(!( "}"  ~~ m/^<?xdigit>$/ ), q{Don't match unrelated xdigit as subrule} ); 
     282ok(!( "}"  ~~ m/^<.xdigit>$/ ), q{Don't match unrelated xdigit as subrule} ); 
    283283ok("}"  ~~ m/^<!xdigit>.$/, q{Match unrelated negated xdigit as subrule}); 
    284284ok("}"  ~~ m/^<-xdigit>$/, q{Match unrelated inverted xdigit as subrule});