Changeset 21416 for perl5

Show
Ignore:
Timestamp:
07/20/08 18:45:50 (4 months ago)
Author:
fglock
Message:

fixed char class with spaces

Location:
perl5/Pugs-Compiler-Rule
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • perl5/Pugs-Compiler-Rule/Changes

    r21309 r21416  
     10.30  2008-07-20 
     2- fixed char class with spaces 
     3 
    140.29  2008-07-12 
    25- minor fix in test output 
  • perl5/Pugs-Compiler-Rule/lib/Pugs/Compiler/Rule.pm

    r21309 r21416  
    55package Pugs::Compiler::Rule; 
    66 
    7 our $VERSION = '0.29'; 
     7our $VERSION = '0.30'; 
    88 
    99use base 'Pugs::Compiler::Regex'; 
  • perl5/Pugs-Compiler-Rule/lib/Pugs/Emitter/Rule/Perl5/CharClass.pm

    r16915 r21416  
    3333        my ( $op, $cmd ) = /(.)(.*)/; 
    3434 
    35         $cmd =~ s/\s//g; 
     35        $cmd =~ s/\s//g 
     36            unless $cmd =~ /\\c\[/; 
    3637 
    3738        #if ( $last_cmd eq '-' 
  • perl5/Pugs-Compiler-Rule/t/13-char_classes.t

    r18715 r21416  
    11 
    2 use Test::More tests => 22; 
     2use Test::More tests => 25; 
    33use Data::Dumper; 
    44$Data::Dumper::Indent = 1; 
     
    123123 
    124124{ 
     125    my $rule = Pugs::Compiler::Regex->compile(  
     126        '^<+[\c[LATIN CAPITAL LETTER A]]>$' ); 
     127    is( "".$rule->match( "3" ), "",  '3 unicode regex' ); 
     128    is( "".$rule->match( "A" ), "A", 'A' ); 
     129    is( "".$rule->match( "b" ), "",  'b' ); 
     130} 
     131 
     132{ 
    125133    my $rule = Pugs::Compiler::Regex->compile( '^<+[3]+[a..z]-[bx]>$' ); 
    126134    is( "".$rule->match( "3" ), "3", '3 ^<+[a..z]-[bx]>$ regex' ); 
     
    128136    is( "".$rule->match( "b" ), "",  'b' ); 
    129137} 
     138 
     139