From 59bf18fd00c2ffaceabb69002ca465b607dab669 Mon Sep 17 00:00:00 2001 From: Alexander Bakanovskii Date: Fri, 19 Sep 2025 14:22:24 +0300 Subject: [PATCH] tests/pinky: add --lookup test --- tests/by-util/test_pinky.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/by-util/test_pinky.rs b/tests/by-util/test_pinky.rs index 6418906ae..8a58c3f1e 100644 --- a/tests/by-util/test_pinky.rs +++ b/tests/by-util/test_pinky.rs @@ -90,6 +90,19 @@ fn test_short_format_i() { assert_eq!(v_actual, v_expect); } +#[cfg(unix)] +#[test] +#[cfg(not(target_os = "openbsd"))] +fn test_lookup() { + let args = ["--lookup"]; + let ts = TestScenario::new(util_name!()); + let actual = ts.ucmd().args(&args).succeeds().stdout_move_str(); + let expect = unwrap_or_return!(expected_result(&ts, &[])).stdout_move_str(); + let v_actual: Vec<&str> = actual.split_whitespace().collect(); + let v_expect: Vec<&str> = expect.split_whitespace().collect(); + assert_eq!(v_actual, v_expect); +} + #[cfg(unix)] #[test] #[cfg(not(target_os = "openbsd"))]