mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
Merge pull request #7325 from jfinkels/rm-prompt-message-inaccessible
rm: correct prompt for removing inaccessible dir
This commit is contained in:
commit
99d4fbdd85
2 changed files with 44 additions and 20 deletions
|
@ -874,6 +874,19 @@ fn test_inaccessible_dir_nonempty() {
|
|||
assert!(at.dir_exists("dir"));
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
#[test]
|
||||
fn test_inaccessible_dir_interactive() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
at.mkdir("dir");
|
||||
at.set_mode("dir", 0);
|
||||
ucmd.args(&["-i", "-d", "dir"])
|
||||
.pipe_in("y\n")
|
||||
.succeeds()
|
||||
.stderr_only("rm: attempt removal of inaccessible directory 'dir'? ");
|
||||
assert!(!at.dir_exists("dir"));
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
#[test]
|
||||
fn test_inaccessible_dir_recursive() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue