summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Green <Paul.Green@stratus.com>2002-01-19 12:17:00 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2002-01-20 17:11:12 +0000
commit388296f8bf01d277cfa6ee511a5ff0d85366576f (patch)
tree89a7526a5f0817f776643eaf1ea8937770819005
parent2825d0017d7ab4a0647a1138570d4e7eee6edd37 (diff)
downloadperl-388296f8bf01d277cfa6ee511a5ff0d85366576f.tar.gz
[PATCH] lib/ExtUtils/t/Command.t -- VOS Fixes
Date: Sat, 19 Jan 02 17:17 est Message-Id: <200201192218.RAA07911@mailhub1.stratus.com> Subject: [PATCH] lib/ExtUtils/t/Command.t -- add more tests From: Paul_GreenVOS@vos.stratus.com Date: Sat, 19 Jan 02 17:19 est Message-Id: <200201192218.RAA12331@mailhub2.stratus.com> p4raw-id: //depot/perl@14360
-rw-r--r--lib/ExtUtils/t/Command.t33
1 files changed, 31 insertions, 2 deletions
diff --git a/lib/ExtUtils/t/Command.t b/lib/ExtUtils/t/Command.t
index a21661f2b2..1127e120bc 100644
--- a/lib/ExtUtils/t/Command.t
+++ b/lib/ExtUtils/t/Command.t
@@ -19,7 +19,7 @@ BEGIN {
}
BEGIN {
- use Test::More tests => 21;
+ use Test::More tests => 24;
use File::Spec;
}
@@ -100,11 +100,40 @@ BEGIN {
ok( abs($now - $stamp) <= 1, 'checking modify time stamp' ) ||
print "# mtime == $stamp, should be $now\n";
+SKIP: {
+ if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32' ||
+ $^O eq 'NetWare' || $^O eq 'dos' || $^O eq 'cygwin') {
+ skip( "different file permission semantics on $^O\n", 3);
+ }
+
+ # change a file to execute-only
+ @ARGV = ( 0100, 'ecmdfile' );
+ ExtUtils::Command::chmod();
+
+ is( ((stat('ecmdfile'))[2] & 07777) & 0700,
+ 0100, 'change a file to execute-only' );
+
# change a file to read-only
+ @ARGV = ( 0400, 'ecmdfile' );
+ ExtUtils::Command::chmod();
+
+ is( ((stat('ecmdfile'))[2] & 07777) & 0700,
+ ($^O eq 'vos' ? 0500 : 0400), 'change a file to read-only' );
+
+ # change a file to write-only
+ @ARGV = ( 0200, 'ecmdfile' );
+ ExtUtils::Command::chmod();
+
+ is( ((stat('ecmdfile'))[2] & 07777) & 0700,
+ ($^O eq 'vos' ? 0700 : 0200), 'change a file to write-only' );
+ }
+
+ # change a file to read-write
@ARGV = ( 0600, 'ecmdfile' );
ExtUtils::Command::chmod();
- is( ((stat('ecmdfile'))[2] & 07777) & 0700, 0600, 'change a file to read-only' );
+ is( ((stat('ecmdfile'))[2] & 07777) & 0700,
+ ($^O eq 'vos' ? 0700 : 0600), 'change a file to read-write' );
# mkpath
@ARGV = ( File::Spec->join( 'ecmddir', 'temp2' ) );