diff options
author | Andrew Burt <isis!aburt> | 1988-01-23 14:57:57 +0000 |
---|---|---|
committer | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1988-01-23 14:57:57 +0000 |
commit | 135863df38bea8d721a115b5d13e08b816104784 (patch) | |
tree | d5947cc711fcade4b0dd8528ee65a70a5d5d189d /t | |
parent | 36ce8bec6e5bbc05c8d60ee17f105fc8b751cada (diff) | |
download | perl-135863df38bea8d721a115b5d13e08b816104784.tar.gz |
perl 1.0 patch 2: Various portability fixes.
Some things didn't work right on System V and Pyramids.
Diffstat (limited to 't')
-rw-r--r-- | t/TEST | 23 | ||||
-rw-r--r-- | t/op.time | 6 |
2 files changed, 24 insertions, 5 deletions
@@ -1,6 +1,6 @@ #!./perl -# $Header: TEST,v 1.0 87/12/18 13:11:34 root Exp $ +# $Header: TEST,v 1.0.1.1 88/01/24 03:55:39 root Exp $ # This is written in a peculiar style, since we're trying to avoid # most of the constructs we'll be testing for. @@ -14,10 +14,29 @@ if ($ARGV[0] eq '') { @ARGV = split(/[ \n]/,`echo base.* comp.* cmd.* io.* op.*`); } +open(config,"../config.sh"); +while (<config>) { + if (/sharpbang='(.*)'/) { + $sharpbang = ($1 eq '#!'); + last; + } +} $bad = 0; while ($test = shift) { print "$test..."; - open(results,"$test|") || (print "can't run.\n"); + if ($sharpbang) { + open(results,"$test|") || (print "can't run.\n"); + } else { + open(script,"$test") || die "Can't run $test"; + $_ = <script>; + close(script); + if (/#!..perl(.*)/) { + $switch = $1; + } else { + $switch = ''; + } + open(results,"./perl$switch $test|") || (print "can't run.\n"); + } $ok = 0; while (<results>) { if ($verbose) { @@ -1,6 +1,6 @@ #!./perl -# $Header: op.time,v 1.0 87/12/18 13:14:33 root Exp $ +# $Header: op.time,v 1.0.1.1 88/01/24 03:56:09 root Exp $ print "1..5\n"; @@ -24,7 +24,7 @@ if ($i >= 200000) {print "ok 2\n";} else {print "not ok 2\n";} ($xsec,$foo) = localtime($now); $localyday = $yday; -if ($sec != $xsec && $yday && $wday && $year) +if ($sec != $xsec && $mday && $year) {print "ok 3\n";} else {print "not ok 3\n";} @@ -32,7 +32,7 @@ else ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime($beg); ($xsec,$foo) = localtime($now); -if ($sec != $xsec && $yday && $wday && $year) +if ($sec != $xsec && $mday && $year) {print "ok 4\n";} else {print "not ok 4\n";} |