From 892f1d910a9c292cd23c90c54ff1652716c0b9ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Habasi=C5=84ski?= Date: Sun, 26 Mar 2023 15:08:56 +0200 Subject: [PATCH] test: du invalid threshold --- tests/by-util/test_du.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) 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!());