Changeset 22882 for src

Show
Ignore:
Timestamp:
11/04/08 21:11:14 (2 months ago)
Author:
azawawi
Message:

[STD_syntax_highlight] print->say
[STD_syntax_highlight] an STD.pm sanity check [masak++]

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/perl6/ETOOMUCHTIME

    r22844 r22882  
    44use warnings; 
    55use English; 
     6use feature qw(say); 
    67use Benchmark; 
    78use File::Path; 
     
    2425WARNING 
    2526 
     27#add a sanity check to make sure STD.pm is correctly built 
     28unless(-r 'lex') { 
     29    die "Could not find 'lex' directory. Maybe you forgot to 'make'\n"; 
     30} 
     31unless(-r 'STD.pmc') { 
     32    die "Could not find 'STD.pmc'. Maybe your forgot to 'make'\n"; 
     33} 
     34 
    2635my $dir_to_test = shift @ARGV || '../../t/spec/'; 
    2736my $fail = 0; 
    2837my $success = 0; 
    29 print "Finding *.t in $dir_to_test... Please wait\n"; 
     38say "Finding *.t in $dir_to_test... Please wait"; 
    3039my @files = sort `find $dir_to_test -name '*.t'`; 
    3140chomp(@files); 
     
    3342 
    3443my $total = 0+@files; 
    35 print "Going to run $total tests... Maybe watch a movie meanwhile?\n"; 
     44say "Going to run $total tests... Maybe watch a movie meanwhile?"; 
    3645 
    3746my $HILITE = "STD_syntax_highlight"; 
     
    5867            "--full-html=$full_html $file"; 
    5968    my $log = `$cmd 2>&1`; 
    60     print "It took " .  
    61         timestr(timediff(new Benchmark,$t0),"nop") . "\n"; 
     69    say "It took " .  
     70        timestr(timediff(new Benchmark,$t0),"nop"); 
    6271 
    6372    if ($CHILD_ERROR) { 
     
    6776        # catch those pesky CTRL-Cs 
    6877        if($CHILD_ERROR &= 127) { 
    69             print "CTRL-C detected... bye bye\n"; 
     78            say "CTRL-C detected... bye bye"; 
    7079            last; 
    7180        } 
     
    92101        print FULL_HTML $error_html; 
    93102        close FULL_HTML; 
    94  
     103        say "error"; 
    95104    } else { 
    96105            $success++; 
    97             print "ok\n"; 
     106            say "ok"; 
    98107    } 
    99108} 
    100109 
    101110printf "\nPassed $success/$total, %6.2f%%\n", $success/$total * 100; 
    102 print "It took " . 
    103     timestr(timediff(new Benchmark,$start_time),"noc") . "\n"; 
     111say "It took " . 
     112    timestr(timediff(new Benchmark,$start_time),"noc"); 
    104113 
    105114if (@failed) { 
    106     print "Failed tests:\n"; 
     115    say "Failed tests:"; 
    107116    for my $file (@failed) { 
    108         print "$file\n"; 
     117        say $file; 
    109118    } 
    110119} 
    111120 
    112121#Copy javascript/css files and inform the user 
    113 print "\nCopying javascript and css files to html directory..\n"; 
     122say "\nCopying javascript and css files to html directory.."; 
    114123copy("$HILITE.js","html/$HILITE.js") or die "Could not copy: $OS_ERROR\n"; 
    115124copy("$JQUERY_JS", "html/$JQUERY_JS") or die "Could not copy: $OS_ERROR\n"; 
    116125copy("$HILITE.css", "html/$HILITE.css") or die "Could not copy: $OS_ERROR\n"; 
    117 print "\nThe output is now in the html directory. Thanks for your time ;-)\n"; 
     126say "\nThe output is now in the html directory. Thanks for your time ;-)"; 
    118127