3 # $Header: TEST,v 1.0.1.1 88/01/24 03:55:39 root Exp $
5 # This is written in a peculiar style, since we're trying to avoid
6 # most of the constructs we'll be testing for.
8 if ($ARGV[0] eq '-v') {
14 @ARGV = split(/[ \n]/,`echo base.* comp.* cmd.* io.* op.*`);
17 open(config,"../config.sh");
19 if (/sharpbang='(.*)'/) {
20 $sharpbang = ($1 eq '#!');
25 while ($test = shift) {
28 open(results,"$test|") || (print "can't run.\n");
30 open(script,"$test") || die "Can't run $test";
38 open(results,"./perl$switch $test|") || (print "can't run.\n");
46 if (/^1\.\.([0-9]+)/) {
51 if (/^ok (.*)/ && $1 == $next) {
60 if ($ok && $next == $max) {
64 print "FAILED on test $next\n";
68 die "Failed a basic test--cannot continue.";
75 print "All tests successful.\n";
77 die "FAILED--no tests were run for some reason.";
83 die "Failed $bad tests.";
86 ($user,$sys,$cuser,$csys) = times;
87 print sprintf("u=%g s=%g cu=%g cs=%g\n",$user,$sys,$cuser,$csys);