From da362ced71e0262f859092610b4ee780ad25369c Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 25 Dec 2020 14:21:47 +0100 Subject: [PATCH] test(rm): Add a test for multiple -f (#1671) --- tests/by-util/test_rm.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/by-util/test_rm.rs b/tests/by-util/test_rm.rs index 7c5a1c787..f9a4dd0d5 100644 --- a/tests/by-util/test_rm.rs +++ b/tests/by-util/test_rm.rs @@ -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!();