Skip to content

Commit 58fa199

Browse files
jkeenanbingos
authored andcommitted
Correct the order of tests of chmod(). (#294)
Per code review by haarg, the order of tests was wrong in the first place. Hence, correctly re-ordering them is a better repair than changing one test's description. For: #294
1 parent 17d3da2 commit 58fa199

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

t/eu_command.t

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,20 +151,21 @@ BEGIN {
151151
is( ((stat('testdir'))[2] & 07777) & 0700,
152152
0100, 'change a dir to execute-only' );
153153

154-
# change a dir to read-only
155-
@ARGV = ( '0400', 'testdir' );
154+
# change a dir to write-only
155+
@ARGV = ( '0200', 'testdir' );
156156
ExtUtils::Command::chmod();
157157

158158
is( ((stat('testdir'))[2] & 07777) & 0700,
159-
0400, 'change a dir to read-only' );
159+
0200, 'change a dir to write-only' );
160160

161-
# change a dir to write-only
162-
@ARGV = ( '0200', 'testdir' );
161+
# change a dir to read-only
162+
@ARGV = ( '0400', 'testdir' );
163163
ExtUtils::Command::chmod();
164164

165165
is( ((stat('testdir'))[2] & 07777) & 0700,
166-
0200, 'change a dir to write-only' );
166+
0400, 'change a dir to read-only' );
167167

168+
# remove the dir we've been playing with
168169
@ARGV = ('testdir');
169170
rm_rf;
170171
ok( ! -e 'testdir', 'rm_rf can delete a read-only dir' );

0 commit comments

Comments
 (0)