diff --git a/tests/by-util/test_od.rs b/tests/by-util/test_od.rs index 4a8ad8f94..c9545d8f0 100644 --- a/tests/by-util/test_od.rs +++ b/tests/by-util/test_od.rs @@ -9,6 +9,7 @@ use std::io::Read; #[cfg(target_os = "linux")] use std::path::Path; +use regex::Regex; use unindent::unindent; use uutests::util::TestScenario; @@ -689,7 +690,7 @@ fn test_hex_offset() { 00000000 00000000 00000000 00000000 000010 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 - 00001F + 00001f ", ); @@ -1343,3 +1344,17 @@ fn test_write_error_dev_full() { .code_is(1) .stderr_contains("No space left on device"); } + +#[test] +#[cfg(target_os = "linux")] +fn test_hex_lowercase() { + // Test verifies that the output hex byte offset is in lowercase + new_ucmd!() + .arg("-Ax") + .arg("-N16") + .arg("-j0xff0") + .arg("/dev/urandom") + .succeeds() + .no_stderr() + .stdout_matches(&Regex::new(r"^000ff0.*").unwrap()); +}