summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1997-02-22 02:41:53 +1200
committerChip Salzenberg <chip@atlantic.net>1997-02-22 02:41:53 +1200
commitb971f6e4f6780f32fa16abecd87989a37436a193 (patch)
tree994f413811bce803c47f599cc156e4beb08184e4 /t
parent1defb83ec18f7f520caf4152c2f5c63dbf3cc155 (diff)
downloadperl-b971f6e4f6780f32fa16abecd87989a37436a193.tar.gz
[inseparable changes from match from perl5.003_28 to perl-5.003_90]
BUILD PROCESS Subject: Re: ccdlflags don't quite work Date: Mon, 24 Feb 1997 16:07:07 -0500 (EST) From: Andy Dougherty <doughera@fractal.phys.lafayette.edu> Files: Configure Msg-ID: <Pine.SOL.3.95q.970224160630.5700E-100000@fractal.lafayette.e (applied based on p5p patch as commit bc75e68b7b49a5ac07dc839aec7ca05eba51175f) Subject: Use $ccflags, $ldflags, $libs when determining $randbits From: Chip Salzenberg <chip@perl.com> Files: Configure Subject: 'installperl -v' doesn't do enough Date: Mon, 24 Feb 1997 08:42:59 -0500 From: Spider Boardman <spider@Orb.Nashua.NH.US> Files: installperl Msg-ID: <199702241342.IAA25945@Orb.Nashua.NH.US> (applied based on p5p patch as commit 7287d43f85a3731984c0e0ef1f20e1515b4140f2) Subject: installperl breaks running system (for a while) Date: Mon, 24 Feb 1997 09:12:11 -0500 From: Spider Boardman <spider@Orb.Nashua.NH.US> Files: installperl Msg-ID: <199702241412.JAA11829@Orb.Nashua.NH.US> (applied based on p5p patch as commit ec2a3d87ba26a9586ad981051a949403027c147a) CORE PORTABILITY Subject: Digital UNIX and 3_28 Date: Sun, 23 Feb 1997 16:27:19 +0200 (EET) From: Jarkko Hietaniemi <jhi@iki.fi> Files: Configure MANIFEST ext/NDBM_File/hints/dec_osf.pl ext/ODBM_File/hints/dec_osf.pl hints/dec_osf.sh Msg-ID: <199702231427.QAA13807@alpha.hut.fi> (applied based on p5p patch as commit 58c0852f6968d0b4520a03e22a56226185ab78c6) Subject: AmigaOS patches to 5.003_28 Date: Sat, 22 Feb 1997 18:08:02 +0100 From: "Norbert Pueschel" <pueschel@imsdd.meb.uni-bonn.de> Files: README.amiga hints/amigaos.sh t/io/fs.t t/lib/anydbm.t t/lib/db-btree.t t/lib/db-hash.t t/lib/db-recno.t t/lib/gdbm.t t/lib/ndbm.t t/lib/odbm.t t/lib/sdbm.t t/op/magic.t t/op/stat.t Msg-ID: <77724759@Armageddon.meb.uni-bonn.de> (applied based on p5p patch as commit b8e6d11c134e93a7795379ceb62b7f950607c667) TESTS Subject: Don't use <*> where readdir() will do From: Chip Salzenberg <chip@perl.com> Files: t/op/stat.t Subject: Allow for $^X to be 'miniperl' Date: Sun, 23 Feb 1997 16:22:45 +0100 From: Dominic Dunlop <domo@slipper.ip.lu> Files: t/op/magic.t private-msgid: <v03020903af360f31aced@[194.51.248.65]>
Diffstat (limited to 't')
-rwxr-xr-xt/io/fs.t6
-rwxr-xr-xt/lib/anydbm.t6
-rwxr-xr-xt/lib/db-btree.t2
-rwxr-xr-xt/lib/db-hash.t2
-rwxr-xr-xt/lib/db-recno.t3
-rwxr-xr-xt/lib/gdbm.t3
-rwxr-xr-xt/lib/ndbm.t3
-rwxr-xr-xt/lib/odbm.t3
-rwxr-xr-xt/lib/sdbm.t3
-rwxr-xr-xt/op/magic.t5
-rwxr-xr-xt/op/stat.t11
11 files changed, 29 insertions, 18 deletions
diff --git a/t/io/fs.t b/t/io/fs.t
index ce4e56bb9e..80575b1e2d 100755
--- a/t/io/fs.t
+++ b/t/io/fs.t
@@ -36,7 +36,8 @@ if (eval {link('b','c')}) {print "ok 3\n";} else {print "not ok 3\n";}
if ($Config{dont_use_nlink} || $nlink == 3)
{print "ok 4\n";} else {print "not ok 4\n";}
-if (($mode & 0777) == 0666) {print "ok 5\n";} else {print "not ok 5\n";}
+if (($mode & 0777) == 0666 || $^O eq 'amigaos')
+ {print "ok 5\n";} else {print "not ok 5\n";}
if ((chmod 0777,'a') == 1) {print "ok 6\n";} else {print "not ok 6\n";}
@@ -70,7 +71,8 @@ if ($foo == 1) {print "ok 16\n";} else {print "not ok 16 $foo\n";}
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks) = stat('b');
if ($ino) {print "ok 17\n";} else {print "not ok 17\n";}
-if (($atime == 500000000 && $mtime == 500000001) || $wd =~ m#/afs/#)
+if (($atime == 500000000 && $mtime == 500000001)
+ || $wd =~ m#/afs/# || $^O eq 'amigaos')
{print "ok 18\n";}
else
{print "not ok 18 $atime $mtime\n";}
diff --git a/t/lib/anydbm.t b/t/lib/anydbm.t
index 52ab22b13e..eeec2caca9 100755
--- a/t/lib/anydbm.t
+++ b/t/lib/anydbm.t
@@ -15,7 +15,8 @@ print "1..12\n";
unlink <Op.dbmx*>;
umask(0);
-print (tie(%h,AnyDBM_File,'Op.dbmx', O_RDWR|O_CREAT, 0640) ? "ok 1\n" : "not ok 1\n");
+print (tie(%h,AnyDBM_File,'Op.dbmx', O_RDWR|O_CREAT, 0640)
+ ? "ok 1\n" : "not ok 1\n");
$Dfile = "Op.dbmx.pag";
if (! -e $Dfile) {
@@ -23,7 +24,8 @@ if (! -e $Dfile) {
}
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks) = stat($Dfile);
-print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) ? "ok 2\n" : "not ok 2\n");
+print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos'
+ ? "ok 2\n" : "not ok 2\n");
while (($key,$value) = each(%h)) {
$i++;
}
diff --git a/t/lib/db-btree.t b/t/lib/db-btree.t
index 0e2a7c34eb..10f585304a 100755
--- a/t/lib/db-btree.t
+++ b/t/lib/db-btree.t
@@ -94,7 +94,7 @@ ok(19, $X = tie(%h, 'DB_File',$Dfile, O_RDWR|O_CREAT, 0640, $DB_BTREE )) ;
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks) = stat($Dfile);
-ok(20, ($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) );
+ok(20, ($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos');
while (($key,$value) = each(%h)) {
$i++;
diff --git a/t/lib/db-hash.t b/t/lib/db-hash.t
index 09c0ee2151..9ebd060e0a 100755
--- a/t/lib/db-hash.t
+++ b/t/lib/db-hash.t
@@ -72,7 +72,7 @@ ok(15, $X = tie(%h, 'DB_File',$Dfile, O_RDWR|O_CREAT, 0640, $DB_HASH ) );
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks) = stat($Dfile);
-ok(16, ($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) );
+ok(16, ($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos');
while (($key,$value) = each(%h)) {
$i++;
diff --git a/t/lib/db-recno.t b/t/lib/db-recno.t
index 045ddd99b0..b5b4f9404d 100755
--- a/t/lib/db-recno.t
+++ b/t/lib/db-recno.t
@@ -93,7 +93,8 @@ my $X ;
my @h ;
ok(17, $X = tie @h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_RECNO ) ;
-ok(18, ( (stat($Dfile))[2] & 0777) == ($^O eq 'os2' ? 0666 : 0640)) ;
+ok(18, ((stat($Dfile))[2] & 0777) == ($^O eq 'os2' ? 0666 : 0640)
+ || $^O eq 'amigaos') ;
#my $l = @h ;
my $l = $X->length ;
diff --git a/t/lib/gdbm.t b/t/lib/gdbm.t
index 62bb936ff1..6a2d5fa54e 100755
--- a/t/lib/gdbm.t
+++ b/t/lib/gdbm.t
@@ -26,7 +26,8 @@ if (! -e $Dfile) {
}
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks) = stat($Dfile);
-print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) ? "ok 2\n" : "not ok 2\n");
+print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos'
+ ? "ok 2\n" : "not ok 2\n");
while (($key,$value) = each(%h)) {
$i++;
}
diff --git a/t/lib/ndbm.t b/t/lib/ndbm.t
index 8e2ba8164a..48f64fef09 100755
--- a/t/lib/ndbm.t
+++ b/t/lib/ndbm.t
@@ -29,7 +29,8 @@ if (! -e $Dfile) {
}
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks) = stat($Dfile);
-print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) ? "ok 2\n" : "not ok 2\n");
+print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos'
+ ? "ok 2\n" : "not ok 2\n");
while (($key,$value) = each(%h)) {
$i++;
}
diff --git a/t/lib/odbm.t b/t/lib/odbm.t
index 0c530d2238..e83d0f979c 100755
--- a/t/lib/odbm.t
+++ b/t/lib/odbm.t
@@ -29,7 +29,8 @@ if (! -e $Dfile) {
}
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks) = stat($Dfile);
-print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) ? "ok 2\n" : "not ok 2\n");
+print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos'
+ ? "ok 2\n" : "not ok 2\n");
while (($key,$value) = each(%h)) {
$i++;
}
diff --git a/t/lib/sdbm.t b/t/lib/sdbm.t
index 65419f9711..b8e02ec3c6 100755
--- a/t/lib/sdbm.t
+++ b/t/lib/sdbm.t
@@ -28,7 +28,8 @@ if (! -e $Dfile) {
}
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks) = stat($Dfile);
-print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) ? "ok 2\n" : "not ok 2\n");
+print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos'
+ ? "ok 2\n" : "not ok 2\n");
while (($key,$value) = each(%h)) {
$i++;
}
diff --git a/t/op/magic.t b/t/op/magic.t
index f3e6ba3cc2..70f2bec2c3 100755
--- a/t/op/magic.t
+++ b/t/op/magic.t
@@ -1,7 +1,5 @@
#!./perl
-# $RCSfile: magic.t,v $$Revision: 4.1 $$Date: 92/08/07 18:28:05 $
-
BEGIN {
$^W = 1;
$| = 1;
@@ -97,7 +95,7 @@ ok 17, $@ eq "foo\n", $@;
ok 18, $$ > 0, $$;
# $^X and $0
-if ($^O eq 'qnx') {
+if ($^O eq 'qnx' || $^O eq 'amigaos') {
chomp($wd = `pwd`);
}
else {
@@ -118,6 +116,7 @@ EOF
ok 21, close(SCRIPT), $!;
ok 22, chmod(0755, $script), $!;
$_ = `$script`;
+s{\bminiperl\b}{perl}; # so that test doesn't fail with miniperl
s{is perl}{is $wd/perl}; # for systems where $^X is only a basename
ok 23, $_ eq $s2, ":$_:!=:$s2:";
$_ = `$wd/perl $script`;
diff --git a/t/op/stat.t b/t/op/stat.t
index 0c9c025bf3..f0fd9a00b1 100755
--- a/t/op/stat.t
+++ b/t/op/stat.t
@@ -40,7 +40,7 @@ sleep 2;
if ($Config{dont_use_nlink} || $nlink == 2)
{print "ok 3\n";} else {print "not ok 3\n";}
-if (($mtime && $mtime != $ctime) || $cwd =~ m#/afs/#) {
+if (($mtime && $mtime != $ctime) || $cwd =~ m#/afs/# || $^O eq 'amigaos') {
print "ok 4\n";
}
else {
@@ -123,18 +123,21 @@ else
{print "not ok 33\n";}
if (! -b '.') {print "ok 34\n";} else {print "not ok 34\n";}
+if ($^O eq 'amigaos') {print "ok 35\n"; goto tty_test;}
+
$cnt = $uid = 0;
die "Can't run op/stat.t test 35 without pwd working" unless $cwd;
($bin) = grep {-d} qw(/bin /usr/bin)
or print ("not ok 35\n"), goto tty_test;
-chdir $bin || die "Can't cd to $bin: $!";
-while (defined($_ = <*>)) {
+opendir BIN, $bin or die "Can't opendir $bin: $!";
+while (defined($_ = readdir BIN)) {
+ $_ = "$bin/$_";
$cnt++;
$uid++ if -u;
last if $uid && $uid < $cnt;
}
-chdir $cwd || die "Can't cd back to $cwd";
+closedir BIN;
# I suppose this is going to fail somewhere...
if ($uid > 0 && $uid < $cnt)