From: Ilya Zakharevich Date: Thu, 10 Oct 1996 02:30:38 +0000 (-0400) Subject: perl 5.003_07: t/lib/anydbm.t t/lib/db-btree.t t/lib/db-hash.t t/lib/db-recno.t t... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=053b5721b2dcbead7dbf8d1629e6a9eeaf4b09ae;p=p5sagit%2Fp5-mst-13.2.git perl 5.003_07: 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 Date: Wed, 9 Oct 1996 22:30:38 -0400 (EDT) From: Ilya Zakharevich File mode under OS/2 is not what you expect. However, this has nothing to do with databases, _and_ there is a test for this in stat.t (which dutifully fails). There is no point to consider this behaviour as a bug in database code. So OS/2 is special-cased in these tests. --- diff --git a/t/lib/anydbm.t b/t/lib/anydbm.t index 957aada..80b39df 100755 --- a/t/lib/anydbm.t +++ b/t/lib/anydbm.t @@ -23,7 +23,7 @@ if (! -e $Dfile) { } ($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"); +print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) ? "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 4142f67..81d32c4 100755 --- a/t/lib/db-btree.t +++ b/t/lib/db-btree.t @@ -78,7 +78,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) == 0640 ); +ok(20, ($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) ); while (($key,$value) = each(%h)) { $i++; diff --git a/t/lib/db-hash.t b/t/lib/db-hash.t index 36a3f33..527dfc9 100755 --- a/t/lib/db-hash.t +++ b/t/lib/db-hash.t @@ -73,7 +73,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) == 0640 ); +ok(16, ($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) ); while (($key,$value) = each(%h)) { $i++; diff --git a/t/lib/db-recno.t b/t/lib/db-recno.t index 9a2695b..999ca60 100755 --- a/t/lib/db-recno.t +++ b/t/lib/db-recno.t @@ -77,7 +77,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) == 0640) ; +ok(18, ( (stat($Dfile))[2] & 0777) == ($^O eq 'os2' ? 0666 : 0640)) ; #my $l = @h ; my $l = $X->length ; diff --git a/t/lib/gdbm.t b/t/lib/gdbm.t index d15228c..c888c00 100755 --- a/t/lib/gdbm.t +++ b/t/lib/gdbm.t @@ -26,7 +26,7 @@ if (! -e $Dfile) { } ($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"); +print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 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 c4788ab..15aa93a 100755 --- a/t/lib/ndbm.t +++ b/t/lib/ndbm.t @@ -29,7 +29,7 @@ if (! -e $Dfile) { } ($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"); +print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 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 301640a..0b1fa50 100755 --- a/t/lib/odbm.t +++ b/t/lib/odbm.t @@ -29,7 +29,7 @@ if (! -e $Dfile) { } ($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"); +print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 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 7b93276..1bb3fde 100755 --- a/t/lib/sdbm.t +++ b/t/lib/sdbm.t @@ -28,7 +28,7 @@ if (! -e $Dfile) { } ($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"); +print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) ? "ok 2\n" : "not ok 2\n"); while (($key,$value) = each(%h)) { $i++; }