From: Malcolm Beattie Date: Tue, 11 Nov 1997 17:49:12 +0000 (+0000) Subject: t/TEST (reverted to @229 version) should have been included in the X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3e6e8be7e558c0e8674ba478f22ba6ebcd1aa86e;p=p5sagit%2Fp5-mst-13.2.git t/TEST (reverted to @229 version) should have been included in the previous change (231) but my way of recovering it didn't work properly. The change 231 comments about successful tests applies to this t/TEST (i.e. as of this change). p4raw-link: @229 on //depot/perl: 2faa37ccf8e46b865687f0ab4992b29a75eb79ea p4raw-id: //depot/perl@232 --- diff --git a/t/TEST b/t/TEST index 1bda4ef..cae8103 100755 --- a/t/TEST +++ b/t/TEST @@ -7,39 +7,24 @@ $| = 1; -if ($ARGV[0] eq '-v') { +if ($#ARGV >= 0 && $ARGV[0] eq '-v') { $verbose = 1; shift; } chdir 't' if -f 't/TEST'; -die "You need to run \"make test\" first to set things up.\n" +die "You need to run \"make test\" first to set things up.\n" unless -e 'perl' or -e 'perl.exe'; $ENV{EMXSHELL} = 'sh'; # For OS/2 -if ($ARGV[0] eq '') { - push( @ARGV, `dir/s/b base` ); - push( @ARGV, `dir/s/b comp` ); - push( @ARGV, `dir/s/b cmd` ); - push( @ARGV, `dir/s/b io` ); - push( @ARGV, `dir/s/b op` ); - push( @ARGV, `dir/s/b pragma` ); - push( @ARGV, `dir/s/b lib` ); - - grep( chomp, @ARGV ); - @ARGV = grep( /\.t$/, @ARGV ); - grep( s/.*t\\//, @ARGV ); -# @ARGV = split(/[ \n]/, -# `echo base/*.t comp/*.t cmd/*.t io/*.t; echo op/*.t pragma/*.t lib/*.t`); -} else { - -@ARGV = map(glob($_),@ARGV); - +if ($#ARGV == -1) { + @ARGV = split(/[ \n]/, + `echo base/*.t comp/*.t cmd/*.t io/*.t; echo op/*.t pragma/*.t lib/*.t`); } -if ($^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'qnx' || 1) { +if ($^O eq 'os2' || $^O eq 'qnx') { $sharpbang = 0; } else { @@ -56,6 +41,8 @@ else { $bad = 0; $good = 0; $total = @ARGV; +$files = 0; +$totmax = 0; while ($test = shift) { if ($test =~ /^$/) { next; @@ -64,11 +51,12 @@ while ($test = shift) { chop($te); print "$te" . '.' x (18 - length($te)); if ($sharpbang) { - open(results,"./$test |") || (print "can't run.\n"); + -x $test || (print "isn't executable.\n"); + open(RESULTS,"./$test |") || (print "can't run.\n"); } else { - open(script,"$test") || die "Can't run $test.\n"; - $_ =