diff --git a/tests/by-util/test_du.rs b/tests/by-util/test_du.rs index 5d0c23f78..081a6016f 100644 --- a/tests/by-util/test_du.rs +++ b/tests/by-util/test_du.rs @@ -546,6 +546,17 @@ fn test_du_threshold() { .stdout_contains("deeper_dir"); } +#[test] +fn test_du_invalid_threshold() { + let ts = TestScenario::new(util_name!()); + + let threshold = "-0"; + + ts.ucmd() + .arg(format!("--threshold={threshold}")) + .fails(); +} + #[test] fn test_du_apparent_size() { let ts = TestScenario::new(util_name!());