3 # $Header: TEST,v 3.0 89/10/18 15:24:06 lwall Locked $
5 # This is written in a peculiar style, since we're trying to avoid
6 # most of the constructs we'll be testing for.
10 if ($ARGV[0] eq '-v') {
15 chdir 't' if -f 't/TEST';
18 @ARGV = split(/[ \n]/,`echo base.* comp.* cmd.* io.* op.*`);
21 open(config,"../config.sh");
23 if (/sharpbang='(.*)'/) {
24 $sharpbang = ($1 eq '#!');
29 while ($test = shift) {
30 if ($test =~ /\.orig$/) {
36 print "$test" . '.' x (16 - length($test));
38 open(results,"./$test|") || (print "can't run.\n");
40 open(script,"$test") || die "Can't run $test.\n";
48 open(results,"./perl$switch $test|") || (print "can't run.\n");
57 if (/^1\.\.([0-9]+)/) {
62 if (/^ok (.*)/ && $1 == $next) {
71 if ($ok && $next == $max) {
75 print "FAILED on test $next\n";
79 die "Failed a basic test--cannot continue.\n";
86 print "All tests successful.\n";
88 die "FAILED--no tests were run for some reason.\n";
92 die "Failed 1 test.\n";
94 die "Failed $bad tests.\n";
97 ($user,$sys,$cuser,$csys) = times;
98 print sprintf("u=%g s=%g cu=%g cs=%g\n",$user,$sys,$cuser,$csys);