Changeset 21650 for perl5

Show
Ignore:
Timestamp:
07/31/08 14:12:56 (5 months ago)
Author:
fglock
Message:

[v6.pm] more tests

Location:
perl5/Pugs-Compiler-Perl6
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • perl5/Pugs-Compiler-Perl6/MANIFEST

    r21617 r21650  
    164164t/spec/S02-builtin_data_types/array_extending.t 
    165165t/spec/S02-builtin_data_types/nested_arrays.t 
     166t/spec/S04-statements/do.t 
    166167t/spec/S04-statements/until.t 
    167168t/spec/S10-packages/import.t 
  • perl5/Pugs-Compiler-Perl6/Makefile.PL

    r21633 r21650  
    143143        $text =~ s/^\s*force_todo.*?\n/force_todo(18,34,40,51,57,66,67);\n/m; 
    144144    } 
     145    if ( $out eq 't/spec/S04-statements/do.t' ) { 
     146        $text = "force_todo(1..8,10..16,20..23);\n" . $text; 
     147        # redo works in perl5 blocks 
     148        $text =~ s/^([^\n]*?\; *redo\;)/ok( 0, "redo works in perl5 blocks", :todo ) ; # $1/mg; 
     149    } 
    145150     
    146151    # add "use Test" to most files 
  • perl5/Pugs-Compiler-Perl6/lib/Pugs/Emitter/Perl6/Perl5.pm

    r21648 r21650  
    836836        my $subname = $n->{sub}{bareword}; 
    837837        if ( $subname ) { 
     838            if ($subname eq 'next') { 
     839                my $param = $n->{param} ? _emit( $n->{param} ) : ''; 
     840                return " next $param "; 
     841            } 
     842            if ($subname eq 'redo') { 
     843                my $param = $n->{param} ? _emit( $n->{param} ) : ''; 
     844                return " redo $param "; 
     845            } 
     846 
    838847            if ($subname eq 'defined') { 
    839848                my $param = _emit( $n->{param} ); 
     
    11171126 
    11181127    if ( $n->{statement} eq 'do' ) { 
    1119         return 'do ' . emit_block( $n->{exp1} ); 
     1128        return 'do { for($_) ' . emit_block( $n->{exp1} ) . ' }'; 
    11201129    } 
    11211130    if ( $n->{statement} eq 'given' ) {