Skip to content

Commit 46dcefe

Browse files
committed
tests/pinky: add --lookup test
1 parent 9e3871c commit 46dcefe

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/by-util/test_pinky.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,19 @@ fn test_short_format_i() {
9090
assert_eq!(v_actual, v_expect);
9191
}
9292

93+
#[cfg(unix)]
94+
#[test]
95+
#[cfg(not(target_os = "openbsd"))]
96+
fn test_lookup() {
97+
let args = ["--lookup"];
98+
let ts = TestScenario::new(util_name!());
99+
let actual = ts.ucmd().args(&args).succeeds().stdout_move_str();
100+
let expect = unwrap_or_return!(expected_result(&ts, &args)).stdout_move_str();
101+
let v_actual: Vec<&str> = actual.split_whitespace().collect();
102+
let v_expect: Vec<&str> = expect.split_whitespace().collect();
103+
assert_eq!(v_actual, v_expect);
104+
}
105+
93106
#[cfg(unix)]
94107
#[test]
95108
#[cfg(not(target_os = "openbsd"))]

0 commit comments

Comments
 (0)