summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-07-21 23:02:30 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-07-21 23:02:30 +0000
commitd536870a93a670c31df812c6614c7c6180896307 (patch)
tree5cf1ec99d15073af4134c26ed80b01caf736cefb /ext
parent52e18b1f277416a33dff2c066a83fdab0520a2d7 (diff)
downloadperl-d536870a93a670c31df812c6614c7c6180896307.tar.gz
Integrate change #11388 from macperl (the *.t parts needed hand massage).
p4raw-link: @11388 on //depot/maint-5.6/macperl: fa1e76071cf9cd14bdc552967af2da831117260a p4raw-id: //depot/perl@11432 p4raw-branched: from //depot/maint-5.6/macperl@11423 'branch in' macos/MacPerlTests.cmd (@11243..) p4raw-branched: from //depot/maint-5.6/macperl@11388 'branch in' macos/xsubpp.patch (@11243..)
Diffstat (limited to 'ext')
-rwxr-xr-xext/DB_File/t/db-btree.t3
-rwxr-xr-xext/DB_File/t/db-hash.t3
-rwxr-xr-xext/DB_File/t/db-recno.t2
-rwxr-xr-xext/NDBM_File/ndbm.t4
-rwxr-xr-xext/POSIX/POSIX.t58
5 files changed, 45 insertions, 25 deletions
diff --git a/ext/DB_File/t/db-btree.t b/ext/DB_File/t/db-btree.t
index 4b4a7967ee..2374810968 100755
--- a/ext/DB_File/t/db-btree.t
+++ b/ext/DB_File/t/db-btree.t
@@ -142,7 +142,8 @@ ok(19, $X = tie(%h, 'DB_File',$Dfile, O_RDWR|O_CREAT, 0640, $DB_BTREE )) ;
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks) = stat($Dfile);
-ok(20, ($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos' || $^O eq 'MSWin32' || $^O eq 'NetWare');
+ok(20, ($mode & 0777) == (($^O eq 'os2' || $^O eq 'MacOS') ? 0666 : 0640)
+ || $^O eq 'amigaos' || $^O eq 'MSWin32' || $^O eq 'NetWare');
my ($key, $value, $i);
while (($key,$value) = each(%h)) {
diff --git a/ext/DB_File/t/db-hash.t b/ext/DB_File/t/db-hash.t
index 6f2ef37b61..1dbb21d5f1 100755
--- a/ext/DB_File/t/db-hash.t
+++ b/ext/DB_File/t/db-hash.t
@@ -108,7 +108,8 @@ ok(15, $X = tie(%h, 'DB_File',$Dfile, O_RDWR|O_CREAT, 0640, $DB_HASH ) );
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks) = stat($Dfile);
-ok(16, ($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos' || $^O eq 'MSWin32' || $^O eq 'NetWare');
+ok(16, ($mode & 0777) == (($^O eq 'os2' || $^O eq 'MacOS') ? 0666 : 0640) ||
+ $^O eq 'amigaos' || $^O eq 'MSWin32' || $^O eq 'NetWare');
my ($key, $value, $i);
while (($key,$value) = each(%h)) {
diff --git a/ext/DB_File/t/db-recno.t b/ext/DB_File/t/db-recno.t
index 6dd913cfc2..13c635591a 100755
--- a/ext/DB_File/t/db-recno.t
+++ b/ext/DB_File/t/db-recno.t
@@ -152,7 +152,7 @@ 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' || $^O eq 'MacOS') ? 0666 : 0640)
|| $^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'amigaos') ;
#my $l = @h ;
diff --git a/ext/NDBM_File/ndbm.t b/ext/NDBM_File/ndbm.t
index cb975e0047..f56034387a 100755
--- a/ext/NDBM_File/ndbm.t
+++ b/ext/NDBM_File/ndbm.t
@@ -40,7 +40,7 @@ my $Dfile = "Op.dbmx.pag";
if (! -e $Dfile) {
($Dfile) = <Op.dbmx*>;
}
-if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'NetWare') {
+if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'MacOS') {
print "ok 2 # Skipped: different file permission semantics\n";
}
else {
@@ -137,7 +137,7 @@ print ($h{'foo'} eq '' ? "ok 11\n" : "not ok 11\n");
print ($h{''} eq 'bar' ? "ok 12\n" : "not ok 12\n");
untie %h;
-unlink 'Op.dbmx.dir', $Dfile;
+unlink <Op.dbmx*>, $Dfile;
{
# sub-class test
diff --git a/ext/POSIX/POSIX.t b/ext/POSIX/POSIX.t
index 2c52f26dc8..a5dc9b8b2c 100755
--- a/ext/POSIX/POSIX.t
+++ b/ext/POSIX/POSIX.t
@@ -21,6 +21,7 @@ $Is_W32 = $^O eq 'MSWin32';
$Is_NetWare = $^O eq 'NetWare';
$Is_Dos = $^O eq 'dos';
$Is_MPE = $^O eq 'mpeix';
+$Is_MacOS = $^O eq 'MacOS';
$testfd = open("TEST", O_RDONLY, 0) and print "ok 1\n";
read($testfd, $buffer, 9) if $testfd > 2;
@@ -52,34 +53,51 @@ else {
$sigset = new POSIX::SigSet 1,3;
delset $sigset 1;
if (!ismember $sigset 1) { print "ok 6\n" }
-if (ismember $sigset 3) { print "ok 7\n" }
-$mask = new POSIX::SigSet &SIGINT;
-$action = new POSIX::SigAction 'main::SigHUP', $mask, 0;
-sigaction(&SIGHUP, $action);
-$SIG{'INT'} = 'SigINT';
-kill 'HUP', $$;
-sleep 1;
-print "ok 11\n";
-
-sub SigHUP {
- print "ok 8\n";
- kill 'INT', $$;
- sleep 2;
- print "ok 9\n";
-}
+if ( ismember $sigset 3) { print "ok 7\n" }
-sub SigINT {
- print "ok 10\n";
+if ($Is_MacOS) {
+ for (8..11) {
+ print "ok $_ # skipped, no kill() support on Mac OS\n";
+ }
}
+else {
+ $mask = new POSIX::SigSet &SIGINT;
+ $action = new POSIX::SigAction 'main::SigHUP', $mask, 0;
+ sigaction(&SIGHUP, $action);
+ $SIG{'INT'} = 'SigINT';
+ kill 'HUP', $$;
+ sleep 1;
+ print "ok 11\n";
+
+ sub SigHUP {
+ print "ok 8\n";
+ kill 'INT', $$;
+ sleep 2;
+ print "ok 9\n";
+ }
+
+ sub SigINT {
+ print "ok 10\n";
+ }
}
if ($Is_MPE) {
print "ok 12 # skipped, _POSIX_OPEN_MAX is inaccurate on MPE\n"
} else {
- print &_POSIX_OPEN_MAX > $fds[1] ? "ok 12\n" : "not ok 12\n"
+ if (&_POSIX_OPEN_MAX) {
+ print &_POSIX_OPEN_MAX > $fds[1] ? "ok 12\n" : "not ok 12\n";
+ } else {
+ print "ok 12 # _POSIX_OPEN_MAX undefined ($fds[1])\n";
+ }
}
-print getcwd() =~ m#[/\\]t$# ? "ok 13\n" : "not ok 13\n";
+my $pat;
+if ($Is_MacOS) {
+ $pat = qr/:t:$/;
+} else {
+ $pat = qr#/t$#;
+}
+print getcwd() =~ $pat ? "ok 13\n" : "not ok 13\n";
# Check string conversion functions.
@@ -153,7 +171,7 @@ try_strftime(27, "Fri Mar 31 00:00:00 2000 091", 0,0,0, 31,2,100);
$| = 0;
# The following line assumes buffered output, which may be not true with EMX:
-print '@#!*$@(!@#$' unless ($^O eq 'os2' || $^O eq 'uwin' || $^O eq 'os390' ||
+print '@#!*$@(!@#$' unless ($Is_MacOS || $^O eq 'os2' || $^O eq 'uwin' || $^O eq 'os390');
(defined $ENV{PERLIO} &&
$ENV{PERLIO} eq 'unix' &&
$Config::Config{useperlio}));