mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 19:47:45 +00:00
rm: add test for "rm .\dir\ -rf" on Windows
https://github.com/uutils/coreutils/issues/3200
This commit is contained in:
parent
929ceb89f4
commit
74bcfff3e8
1 changed files with 13 additions and 0 deletions
|
@ -226,6 +226,19 @@ fn test_rm_directory_without_flag() {
|
||||||
.stderr_contains(&format!("cannot remove '{dir}': Is a directory"));
|
.stderr_contains(&format!("cannot remove '{dir}': Is a directory"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
#[cfg(windows)]
|
||||||
|
// https://github.com/uutils/coreutils/issues/3200
|
||||||
|
fn test_rm_directory_with_trailing_backslash() {
|
||||||
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
|
let dir = "dir";
|
||||||
|
|
||||||
|
at.mkdir(dir);
|
||||||
|
|
||||||
|
ucmd.arg(".\\dir\\").arg("-rf").succeeds();
|
||||||
|
assert!(!at.dir_exists(dir));
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_rm_verbose() {
|
fn test_rm_verbose() {
|
||||||
let (at, mut ucmd) = at_and_ucmd!();
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue