- Timestamp:
- 07/20/08 18:45:50 (4 months ago)
- Location:
- perl5/Pugs-Compiler-Rule
- Files:
-
- 4 modified
-
Changes (modified) (1 diff)
-
lib/Pugs/Compiler/Rule.pm (modified) (1 diff)
-
lib/Pugs/Emitter/Rule/Perl5/CharClass.pm (modified) (1 diff)
-
t/13-char_classes.t (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
perl5/Pugs-Compiler-Rule/Changes
r21309 r21416 1 0.30 2008-07-20 2 - fixed char class with spaces 3 1 4 0.29 2008-07-12 2 5 - minor fix in test output -
perl5/Pugs-Compiler-Rule/lib/Pugs/Compiler/Rule.pm
r21309 r21416 5 5 package Pugs::Compiler::Rule; 6 6 7 our $VERSION = '0. 29';7 our $VERSION = '0.30'; 8 8 9 9 use base 'Pugs::Compiler::Regex'; -
perl5/Pugs-Compiler-Rule/lib/Pugs/Emitter/Rule/Perl5/CharClass.pm
r16915 r21416 33 33 my ( $op, $cmd ) = /(.)(.*)/; 34 34 35 $cmd =~ s/\s//g; 35 $cmd =~ s/\s//g 36 unless $cmd =~ /\\c\[/; 36 37 37 38 #if ( $last_cmd eq '-' -
perl5/Pugs-Compiler-Rule/t/13-char_classes.t
r18715 r21416 1 1 2 use Test::More tests => 2 2;2 use Test::More tests => 25; 3 3 use Data::Dumper; 4 4 $Data::Dumper::Indent = 1; … … 123 123 124 124 { 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 { 125 133 my $rule = Pugs::Compiler::Regex->compile( '^<+[3]+[a..z]-[bx]>$' ); 126 134 is( "".$rule->match( "3" ), "3", '3 ^<+[a..z]-[bx]>$ regex' ); … … 128 136 is( "".$rule->match( "b" ), "", 'b' ); 129 137 } 138 139
