Skip to content

Commit

Permalink
Merge pull request #3723 from niyaznigmatullin/add_issue_3722_test
Browse files Browse the repository at this point in the history
tests/rm: add test for issue #3722
  • Loading branch information
sylvestre authored Jul 17, 2022
2 parents 0ea3a73 + 028c08c commit ef6182d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/by-util/test_rm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,3 +347,19 @@ fn test_rm_interactive_never() {

assert!(!at.file_exists(file_2));
}

#[test]
#[ignore = "issue #3722"]
fn test_rm_directory_rights_rm1() {
let (at, mut ucmd) = at_and_ucmd!();
at.mkdir_all("b/a/p");
at.mkdir_all("b/c");
at.mkdir_all("b/d");
at.set_readonly("b/a");
ucmd.args(&["-rf", "b"])
.fails()
.stderr_contains("Permission denied");
assert!(at.dir_exists("b/a/p"));
assert!(!at.dir_exists("b/c"));
assert!(!at.dir_exists("b/d"));
}

0 comments on commit ef6182d

Please sign in to comment.