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

Use time-style only if time is provided

This commit is contained in:
Carbrex 2024-04-01 16:48:19 +05:30 committed by Sylvestre Ledru
parent ffda2a4b40
commit 49c7e65f5d
2 changed files with 17 additions and 2 deletions

View file

@ -1116,3 +1116,13 @@ fn test_du_files0_from_combined() {
assert!(stderr.contains("file operands cannot be combined with --files0-from"));
}
#[test]
fn test_invalid_time_style() {
let ts = TestScenario::new(util_name!());
ts.ucmd()
.arg("-s")
.arg("--time-style=banana")
.succeeds()
.stdout_does_not_contain("du: invalid argument 'banana' for 'time style'");
}