mirror of
https://github.com/uutils/coreutils
synced 2024-12-14 23:32:39 +00:00
Merge pull request #3723 from niyaznigmatullin/add_issue_3722_test
tests/rm: add test for issue #3722
This commit is contained in:
commit
ef6182d209
1 changed files with 16 additions and 0 deletions
|
@ -347,3 +347,19 @@ fn test_rm_interactive_never() {
|
||||||
|
|
||||||
assert!(!at.file_exists(file_2));
|
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"));
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue