From: Michael G. Schwern Date: Mon, 11 Jul 2005 18:41:30 +0000 (-0700) Subject: Understand "ok" with no number X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f458b6e8d4ef066d8e0768073b3c77d2c9bf98e0;p=p5sagit%2Fp5-mst-13.2.git Understand "ok" with no number Message-ID: <20050712014130.GA20855@windhund.schwern.org> p4raw-id: //depot/perl@25114 --- diff --git a/t/TEST b/t/TEST index aad1660..ea0f093 100755 --- a/t/TEST +++ b/t/TEST @@ -75,14 +75,14 @@ sub _find_tests { my($dir) = @_; opendir DIR, $dir or die "Trouble opening $dir: $!"; foreach my $f (sort { $a cmp $b } readdir DIR) { - next if $f eq $curdir or $f eq $updir or + next if $f eq $curdir or $f eq $updir or $f =~ /^(?:CVS|RCS|SCCS|\.svn)$/; - my $fullpath = File::Spec->catfile($dir, $f); + my $fullpath = File::Spec->catfile($dir, $f); - _find_tests($fullpath) if -d $fullpath; - $fullpath = VMS::Filespec::unixify($fullpath) if $^O eq 'VMS'; - push @ARGV, $fullpath if $f =~ /\.t$/; + _find_tests($fullpath) if -d $fullpath; + $fullpath = VMS::Filespec::unixify($fullpath) if $^O eq 'VMS'; + push @ARGV, $fullpath if $f =~ /\.t$/; } } @@ -105,7 +105,7 @@ sub _populate_hash { unless (@ARGV) { foreach my $dir (qw(base comp cmd run io op uni)) { - _find_tests($dir); + _find_tests($dir); } _find_tests("lib") unless $::core; # Config.pm may be broken for make minitest. And this is only a refinement @@ -140,7 +140,7 @@ unless (@ARGV) { } my $mani = File::Spec->catfile($updir, "MANIFEST"); if (open(MANI, $mani)) { - while () { # similar code in t/harness + while () { # similar code in t/harness if (m!^(ext/(\S+)/+(?:[^/\s]+\.t|test\.pl)|lib/\S+?(?:\.t|test\.pl))\s!) { my $t = $1; my $extension = $2; @@ -159,7 +159,7 @@ unless (@ARGV) { } close MANI; } else { - warn "$0: cannot open $mani: $!\n"; + warn "$0: cannot open $mani: $!\n"; } unless ($::core) { _find_tests('pod'); @@ -175,7 +175,7 @@ unless (@ARGV) { if ($::deparse) { _testprogs('deparse', '', @ARGV); } -elsif( $::compile ) { +elsif( $::compile ) { _testprogs('compile', '', @ARGV); } elsif( $::bytecompile ) { @@ -234,15 +234,15 @@ TESTING BYTECODE COMPILER EOT $ENV{PERLCC_TIMEOUT} = 120 - if ($type eq 'compile' && !$ENV{PERLCC_TIMEOUT}); + if ($type eq 'compile' && !$ENV{PERLCC_TIMEOUT}); $::bad_files = 0; foreach my $t (@tests) { unless (exists $::path_to_name{$t}) { - my $tname = File::Spec->catfile('t',$t); - $tname = VMS::Filespec::unixify($tname) if $^O eq 'VMS'; - $::path_to_name{$t} = $tname; + my $tname = File::Spec->catfile('t',$t); + $tname = VMS::Filespec::unixify($tname) if $^O eq 'VMS'; + $::path_to_name{$t} = $tname; } } my $maxlen = 0; @@ -265,7 +265,7 @@ EOT if ( $::infinite{$test} && $type eq 'compile' ) { print STDERR "$test creates infinite loop! Skipping.\n"; - next; + next; } if ($test =~ /^$/) { next; @@ -291,17 +291,17 @@ EOT # XXX DAPM %OVER not defined anywhere # $test = $OVER{$test} if exists $OVER{$test}; - open(SCRIPT,"<$test") or die "Can't run $test.\n"; - $_ =