From e9dc2930ee8260b3c3f7863ade3426239eb0332f Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Fri, 8 Dec 2023 15:10:48 +0100 Subject: ls: handle invalid block size as GNU does --- tests/by-util/test_ls.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/by-util/test_ls.rs') diff --git a/tests/by-util/test_ls.rs b/tests/by-util/test_ls.rs index 8bc2b75ac..887f90e0f 100644 --- a/tests/by-util/test_ls.rs +++ b/tests/by-util/test_ls.rs @@ -3856,6 +3856,16 @@ fn test_posixly_correct() { .stdout_contains_line("total 8"); } +#[test] +fn test_ls_invalid_block_size() { + new_ucmd!() + .arg("--block-size=invalid") + .fails() + .code_is(2) + .no_stdout() + .stderr_is("ls: invalid --block-size argument 'invalid'\n"); +} + #[test] fn test_ls_hyperlink() { let scene = TestScenario::new(util_name!()); -- cgit v1.2.3