From cbac6cc9038681c457035a0a7f5d30ccb9ac6883 Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Sat, 13 Jun 2020 14:38:43 -0500 Subject: [PATCH] tests ~ increase test detail to diagnose MacOS hostname test failure --- tests/by-util/test_hostname.rs | 4 +++- tests/common/util.rs | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/by-util/test_hostname.rs b/tests/by-util/test_hostname.rs index c5ffc5ff1..9e0d473f0 100644 --- a/tests/by-util/test_hostname.rs +++ b/tests/by-util/test_hostname.rs @@ -12,7 +12,9 @@ fn test_hostname() { #[test] fn test_hostname_ip() { - let result = new_ucmd!().arg("-i").succeeds(); + let result = new_ucmd!().arg("-i").run(); + println!("{:#?}", result); + assert!(result.success); assert!(!result.stdout.trim().is_empty()); } diff --git a/tests/common/util.rs b/tests/common/util.rs index 6585ddd96..b581b8de9 100644 --- a/tests/common/util.rs +++ b/tests/common/util.rs @@ -68,6 +68,7 @@ pub fn repeat_str(s: &str, n: u32) -> String { /// A command result is the outputs of a command (streams and status code) /// within a struct which has convenience assertion functions about those outputs +#[derive(Debug)] pub struct CmdResult { //tmpd is used for convenience functions for asserts against fixtures tmpd: Option>,