summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2004-03-22 21:05:09 +0000
committerNicholas Clark <nick@ccl4.org>2004-03-22 21:05:09 +0000
commitff2be7edd67a7f5ccf9d60bb41eaaf8b3bef359e (patch)
treec64cea1c8ee36ce504ab26a0f8411c539bea229c /t
parent882672714c7b1c946ae8e88a96766a508485d95e (diff)
downloadperl-ff2be7edd67a7f5ccf9d60bb41eaaf8b3bef359e.tar.gz
Don't assume that the chmod will always work.
(It won't for files on *BSD where chflags has set uchg, which is what the OS X perforce client does) p4raw-id: //depot/perl@22559
Diffstat (limited to 't')
-rwxr-xr-xt/op/filetest.t6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/op/filetest.t b/t/op/filetest.t
index d0ca69a12a..271c4f07ab 100755
--- a/t/op/filetest.t
+++ b/t/op/filetest.t
@@ -19,8 +19,8 @@ ok( !-d 'TEST' );
ok( -r 'TEST' );
# make sure TEST is r-x
-eval { chmod 0555, 'TEST' };
-$bad_chmod = $@;
+eval { chmod 0555, 'TEST' or die "chmod 0555, 'TEST' failed: $!" };
+chomp ($bad_chmod = $@);
$oldeuid = $>; # root can read and write anything
eval '$> = 1'; # so switch uid (may not be implemented)
@@ -35,7 +35,7 @@ SKIP: {
skip('we cannot chmod symlinks');
}
elsif ($bad_chmod) {
- skip( $@ );
+ skip( $bad_chmod );
}
else {
ok( !-w 'TEST' );