summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorChip Salzenberg <chip@perl.com>1997-02-25 03:24:03 +1200
committerChip Salzenberg <chip@atlantic.net>1997-04-03 10:03:25 +1200
commit544a35660dae17ef1feb6a04b0ee237bb0d8dcc1 (patch)
tree545670442d27228b37b48411c05f72a1c7acc1ed /t
parentafea815c58c54233979716dd5770b69df2df51f8 (diff)
downloadperl-544a35660dae17ef1feb6a04b0ee237bb0d8dcc1.tar.gz
Make *dbm tests work with Win32
Diffstat (limited to 't')
-rwxr-xr-xt/lib/anydbm.t12
-rwxr-xr-xt/lib/gdbm.t12
-rwxr-xr-xt/lib/ndbm.t12
-rwxr-xr-xt/lib/odbm.t12
-rwxr-xr-xt/lib/sdbm.t15
5 files changed, 42 insertions, 21 deletions
diff --git a/t/lib/anydbm.t b/t/lib/anydbm.t
index eeec2caca9..6ddbf25e2d 100755
--- a/t/lib/anydbm.t
+++ b/t/lib/anydbm.t
@@ -22,10 +22,14 @@ $Dfile = "Op.dbmx.pag";
if (! -e $Dfile) {
($Dfile) = <Op.dbmx*>;
}
-($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
- $blksize,$blocks) = stat($Dfile);
-print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos'
- ? "ok 2\n" : "not ok 2\n");
+if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32') {
+ print "ok 2\n";
+}
+else {
+ ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
+ $blksize,$blocks) = stat($Dfile);
+ print (($mode & 0777) == 0640 ? "ok 2\n" : "not ok 2\n");
+}
while (($key,$value) = each(%h)) {
$i++;
}
diff --git a/t/lib/gdbm.t b/t/lib/gdbm.t
index 6a2d5fa54e..a0f081fa1e 100755
--- a/t/lib/gdbm.t
+++ b/t/lib/gdbm.t
@@ -24,10 +24,14 @@ $Dfile = "Op.dbmx.pag";
if (! -e $Dfile) {
($Dfile) = <Op.dbmx*>;
}
-($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
- $blksize,$blocks) = stat($Dfile);
-print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos'
- ? "ok 2\n" : "not ok 2\n");
+if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32') {
+ print "ok 2\n";
+}
+else {
+ ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
+ $blksize,$blocks) = stat($Dfile);
+ print (($mode & 0777) == 0640 ? "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 48f64fef09..b10d7c26d4 100755
--- a/t/lib/ndbm.t
+++ b/t/lib/ndbm.t
@@ -27,10 +27,14 @@ $Dfile = "Op.dbmx.pag";
if (! -e $Dfile) {
($Dfile) = <Op.dbmx*>;
}
-($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
- $blksize,$blocks) = stat($Dfile);
-print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos'
- ? "ok 2\n" : "not ok 2\n");
+if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32') {
+ print "ok 2\n";
+}
+else {
+ ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
+ $blksize,$blocks) = stat($Dfile);
+ print (($mode & 0777) == 0640 ? "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 e83d0f979c..06ba844029 100755
--- a/t/lib/odbm.t
+++ b/t/lib/odbm.t
@@ -27,10 +27,14 @@ $Dfile = "Op.dbmx.pag";
if (! -e $Dfile) {
($Dfile) = <Op.dbmx*>;
}
-($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
- $blksize,$blocks) = stat($Dfile);
-print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos'
- ? "ok 2\n" : "not ok 2\n");
+if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32') {
+ print "ok 2\n";
+}
+else {
+ ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
+ $blksize,$blocks) = stat($Dfile);
+ print (($mode & 0777) == 0640 ? "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 b8e02ec3c6..9928847b94 100755
--- a/t/lib/sdbm.t
+++ b/t/lib/sdbm.t
@@ -20,16 +20,21 @@ print "1..12\n";
unlink <Op.dbmx*>;
umask(0);
-print (tie(%h,SDBM_File,'Op.dbmx', O_RDWR|O_CREAT, 0640) ? "ok 1\n" : "not ok 1\n");
+print (tie(%h,SDBM_File,'Op.dbmx', O_RDWR|O_CREAT, 0640)
+ ? "ok 1\n" : "not ok 1\n");
$Dfile = "Op.dbmx.pag";
if (! -e $Dfile) {
($Dfile) = <Op.dbmx*>;
}
-($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
- $blksize,$blocks) = stat($Dfile);
-print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos'
- ? "ok 2\n" : "not ok 2\n");
+if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32') {
+ print "ok 2\n";
+}
+else {
+ ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
+ $blksize,$blocks) = stat($Dfile);
+ print (($mode & 0777) == 0640 ? "ok 2\n" : "not ok 2\n");
+}
while (($key,$value) = each(%h)) {
$i++;
}