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

rm: exit normally when -f is used with no operand

This commit is contained in:
Alex Lyon 2017-12-26 15:25:03 -08:00
parent be5ce3c252
commit a1cf262414
2 changed files with 20 additions and 2 deletions

View file

@ -158,3 +158,18 @@ fn test_rm_invalid_symlink() {
ucmd.arg(link).succeeds();
}
#[test]
fn test_rm_force_no_operand() {
let mut ucmd = new_ucmd!();
ucmd.arg("-f").succeeds().no_stderr();
}
#[test]
fn test_rm_no_operand() {
let mut ucmd = new_ucmd!();
ucmd.fails()
.stderr_is("rm: error: missing an argument\nrm: error: for help, try 'rm --help'\n");
}