mirror of
https://github.com/uutils/coreutils
synced 2024-07-23 19:04:18 +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
|
@ -226,6 +226,19 @@ fn test_rm_directory_without_flag() {
|
|||
.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]
|
||||
fn test_rm_verbose() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
|
|
Loading…
Reference in a new issue