1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-15 11:36:16 +00:00

Merge pull request #2210 from jhscheer/dns_lookup

who: fix `--lookup`
This commit is contained in:
Sylvestre Ledru 2021-05-15 21:18:12 +02:00 committed by GitHub
commit 620a5a5df6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 78 additions and 61 deletions

View file

@ -98,6 +98,23 @@ fn test_short_format_q() {
assert_eq!(v_actual, v_expect);
}
#[cfg(target_os = "linux")]
#[test]
fn test_no_flag() {
let scene = TestScenario::new(util_name!());
let actual = scene.ucmd().succeeds().stdout_move_str();
let expect = scene
.cmd_keepenv(util_name!())
.env("LANGUAGE", "C")
.succeeds()
.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(target_os = "linux")]
fn expected_result(args: &[&str]) -> String {
TestScenario::new(util_name!())

View file

@ -162,7 +162,6 @@ fn test_users() {
#[cfg(target_os = "linux")]
#[test]
#[ignore]
fn test_lookup() {
for opt in vec!["--lookup"] {
new_ucmd!()