|
|
9738ed |
From 58fa199a752913dfb0455ac1397e897afcc1f9b4 Mon Sep 17 00:00:00 2001
|
|
|
9738ed |
From: James E Keenan <jkeenan@cpan.org>
|
|
|
9738ed |
Date: Thu, 11 May 2017 04:23:40 -0400
|
|
|
9738ed |
Subject: [PATCH] Correct the order of tests of chmod(). (#294)
|
|
|
9738ed |
MIME-Version: 1.0
|
|
|
9738ed |
Content-Type: text/plain; charset=UTF-8
|
|
|
9738ed |
Content-Transfer-Encoding: 8bit
|
|
|
9738ed |
|
|
|
9738ed |
Per code review by haarg, the order of tests was wrong in the first place.
|
|
|
9738ed |
Hence, correctly re-ordering them is a better repair than changing one test's
|
|
|
9738ed |
description.
|
|
|
9738ed |
|
|
|
9738ed |
For: https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/pull/294
|
|
|
9738ed |
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
9738ed |
---
|
|
|
9738ed |
t/eu_command.t | 13 +++++++------
|
|
|
9738ed |
1 file changed, 7 insertions(+), 6 deletions(-)
|
|
|
9738ed |
|
|
|
9738ed |
diff --git a/t/eu_command.t b/t/eu_command.t
|
|
|
9738ed |
index 269aa5c..32a6f59 100644
|
|
|
9738ed |
--- a/t/eu_command.t
|
|
|
9738ed |
+++ b/t/eu_command.t
|
|
|
9738ed |
@@ -151,20 +151,21 @@ BEGIN {
|
|
|
9738ed |
is( ((stat('testdir'))[2] & 07777) & 0700,
|
|
|
9738ed |
0100, 'change a dir to execute-only' );
|
|
|
9738ed |
|
|
|
9738ed |
- # change a dir to read-only
|
|
|
9738ed |
- @ARGV = ( '0400', 'testdir' );
|
|
|
9738ed |
+ # change a dir to write-only
|
|
|
9738ed |
+ @ARGV = ( '0200', 'testdir' );
|
|
|
9738ed |
ExtUtils::Command::chmod();
|
|
|
9738ed |
|
|
|
9738ed |
is( ((stat('testdir'))[2] & 07777) & 0700,
|
|
|
9738ed |
- 0400, 'change a dir to read-only' );
|
|
|
9738ed |
+ 0200, 'change a dir to write-only' );
|
|
|
9738ed |
|
|
|
9738ed |
- # change a dir to write-only
|
|
|
9738ed |
- @ARGV = ( '0200', 'testdir' );
|
|
|
9738ed |
+ # change a dir to read-only
|
|
|
9738ed |
+ @ARGV = ( '0400', 'testdir' );
|
|
|
9738ed |
ExtUtils::Command::chmod();
|
|
|
9738ed |
|
|
|
9738ed |
is( ((stat('testdir'))[2] & 07777) & 0700,
|
|
|
9738ed |
- 0200, 'change a dir to write-only' );
|
|
|
9738ed |
+ 0400, 'change a dir to read-only' );
|
|
|
9738ed |
|
|
|
9738ed |
+ # remove the dir we've been playing with
|
|
|
9738ed |
@ARGV = ('testdir');
|
|
|
9738ed |
rm_rf;
|
|
|
9738ed |
ok( ! -e 'testdir', 'rm_rf can delete a read-only dir' );
|
|
|
9738ed |
--
|
|
|
9738ed |
2.9.4
|
|
|
9738ed |
|