From 4c7d8f8253f74994ca7314944ae4a24548d40294 Mon Sep 17 00:00:00 2001 From: Fuad Ismail Date: Sun, 24 Nov 2024 23:12:26 +0700 Subject: [PATCH] tests/dmesg: add invalid time-format test. --- tests/by-util/test_dmesg.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/by-util/test_dmesg.rs b/tests/by-util/test_dmesg.rs index c174518..f8c6df5 100644 --- a/tests/by-util/test_dmesg.rs +++ b/tests/by-util/test_dmesg.rs @@ -46,3 +46,13 @@ fn test_kmsg_time_format() { .stdout_is_fixture(expected_output); } } + +#[test] +fn test_invalid_time_format() { + new_ucmd!() + .arg("--time-format=definitely-invalid") + .fails() + .code_is(1) + .no_stdout() + .stderr_is("dmesg: unknown time format: definitely-invalid"); +}