File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1140,9 +1140,10 @@ fn test_rm_directory_not_writable() {
11401140
11411141 // Check for expected error message
11421142 // When the parent directory (b/a) doesn't have write permission,
1143- // we get "Permission denied" when trying to remove the subdirectory
1144- let stderr = result. stderr_str ( ) ;
1145- assert ! ( stderr. contains( "rm: cannot remove 'b/a/p': Permission denied" ) ) ;
1143+ // we get "Permission denied" when trying to remove the subdirectory.
1144+ // The error tracking must be correct so we don't attempt to remove the parent
1145+ // directory after child failure (which would produce extra "Directory not empty" errors).
1146+ result. stderr_only ( "rm: cannot remove 'b/a/p': Permission denied\n " ) ;
11461147
11471148 // Check which directories still exist
11481149 assert ! ( at. dir_exists( "b/a/p" ) ) ; // Should still exist (parent not writable)
You can’t perform that action at this time.
0 commit comments