summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorAndrew Burt <isis!aburt>1988-01-23 14:57:57 +0000
committerLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1988-01-23 14:57:57 +0000
commit135863df38bea8d721a115b5d13e08b816104784 (patch)
treed5947cc711fcade4b0dd8528ee65a70a5d5d189d /t
parent36ce8bec6e5bbc05c8d60ee17f105fc8b751cada (diff)
downloadperl-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/TEST23
-rw-r--r--t/op.time6
2 files changed, 24 insertions, 5 deletions
diff --git a/t/TEST b/t/TEST
index 11c48e2908..451bbe6be6 100644
--- a/t/TEST
+++ b/t/TEST
@@ -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) {
diff --git a/t/op.time b/t/op.time
index 1d92bac50f..87ef2605d1 100644
--- a/t/op.time
+++ b/t/op.time
@@ -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";}