- Timestamp:
- 07/23/08 13:06:04 (6 months ago)
- Location:
- perl5/Pugs-Compiler-Perl6
- Files:
-
- 2 modified
-
MANIFEST (modified) (1 diff)
-
Makefile.PL (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
perl5/Pugs-Compiler-Perl6/MANIFEST
r21419 r21452 123 123 t/regex/from_perl6_rules/anchors.t 124 124 t/regex/from_perl6_rules/inline.t 125 t/regex/from_perl6_rules/named_chars.t 125 t/regex/from_perl6_rules/named_chars-1.t 126 t/regex/from_perl6_rules/named_chars-2.t 126 127 t/regex/from_perl6_rules/noncap.t 127 128 t/regex/rx_perl5_escape.t -
perl5/Pugs-Compiler-Perl6/Makefile.PL
r21433 r21452 34 34 35 35 # Parse MANIFEST and copy the tests 36 my $rewrite_test; 37 $rewrite_test = sub { 38 my ($out, $text) = @_; 39 40 # split big tests in smaller files 41 if ( $out =~ /\.t$/ && length($text) > 30000 ) { 42 $out =~ s/-?(\d*)\.t$/ "-" . (($1||0)+1) . ".t" /e; 43 my ($part, $text) = $text =~ /^(.{20000,}?\n)(.*)/s; 44 $rewrite_test->($out, $part); 45 $out =~ s/-?(\d*)\.t$/ "-" . (($1||0)+1) . ".t" /e; 46 $rewrite_test->($out, $text); 47 return; 48 } 49 50 # fix problems caused by splitting 51 if ( $out eq 't/regex/from_perl6_rules/named_chars-1.t' ) { 52 $text =~ s/^plan \d+;/plan 200;/m; 53 $text =~ s/^force_todo.*?\n//m; 54 $text .= "}\n"; 55 } 56 if ( $out eq 't/regex/from_perl6_rules/named_chars-2.t' ) { 57 $text = 58 "plan 219\n" 59 . "{\n" 60 . $text; 61 } 62 63 # add "use Test" to most files 64 if ( $out ne 't/01-sanity/05-sub.t' ) { 65 $text = "use Test;\n" . $text; 66 } 67 68 # add "use v6-alpha" everywhere 69 # $text =~ s/^use v6;/use v6-alpha;/m; 70 $text = "use v6-alpha;\n" . $text; 71 72 open( my $fh, ">", $out ) || 73 die "can't create $out $!" ; 74 print $fh $text; 75 }; 76 36 77 if (@inc) { 37 use File::Copy;38 78 use File::Path; 39 79 use File::Basename; 40 80 41 81 open MANIFEST, '< MANIFEST' or die "Cannot open MANIFEST: $!"; 82 my %seen; 42 83 while (<MANIFEST>) { 43 84 chomp; 44 85 /^t\// or next; 45 mkpath(dirname($_)); 46 my $src = "$inc[-1]/../$_"; 86 s/-\d+\.t$/.t/; 87 next if $seen{$_}; 88 $seen{$_} = 1; 89 my $out = $_; 90 mkpath(dirname($out)); 91 my $src = "$inc[-1]/../$out"; 47 92 $src = "$inc[-1]/../ext/Test/lib/Test.pm" if $_ eq 't/Test.pm'; 48 next unless -f $src; 49 copy($src => $_); 50 `$^X -i -pe ' s/^use v6;/use v6-alpha;/ ' '$_' ` 51 if -f $_; 93 next unless -f $src; 94 my $text = do { local( @ARGV, $/ ) = $src ; <> } ; 95 $rewrite_test->( $out, $text ); 52 96 } 53 97 } … … 77 121 # precompile Perl6Prelude.pm and Test.pm 78 122 pmc_support(); 123
