1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00

test(rm): Add a test for multiple -f (#1671)

This commit is contained in:
Sylvestre Ledru 2020-12-25 14:21:47 +01:00 committed by GitHub
parent 10cd480a01
commit da362ced71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,6 +85,24 @@ fn test_rm_force() {
assert!(!at.file_exists(file_b));
}
#[test]
fn test_rm_force_multiple() {
let (at, mut ucmd) = at_and_ucmd!();
let file_a = "test_rm_force_a";
let file_b = "test_rm_force_b";
ucmd.arg("-f")
.arg("-f")
.arg("-f")
.arg(file_a)
.arg(file_b)
.succeeds()
.no_stderr();
assert!(!at.file_exists(file_a));
assert!(!at.file_exists(file_b));
}
#[test]
fn test_rm_empty_directory() {
let (at, mut ucmd) = at_and_ucmd!();