1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

Merge pull request #1033 from shinh/rm-dir-link

rm: Remove symlinks to directories without -r
This commit is contained in:
Alex Lyon 2017-04-03 08:35:37 -07:00 committed by GitHub
commit 5f1cb07df8
2 changed files with 21 additions and 1 deletions

View file

@ -136,3 +136,15 @@ fn test_rm_verbose() {
ucmd.arg("-v").arg(file_a).arg(file_b).succeeds()
.stdout_only(format!("removed '{}'\nremoved '{}'\n", file_a, file_b));
}
#[test]
fn test_rm_dir_symlink() {
let (at, mut ucmd) = at_and_ucmd!();
let dir = "test_rm_dir_symlink_dir";
let link = "test_rm_dir_symlink_link";
at.mkdir(dir);
at.symlink(dir, link);
ucmd.arg(link).succeeds();
}