From f22fd3a3fc606d94f68386526f6e4fd56ab7a3b2 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 14 May 2018 19:19:36 -0400 Subject: suppress output when testing rendering --- src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 70c6adf..b32c2b7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,7 +26,8 @@ fn main() { talk_about_time!("parsing args"); let data = data::collect(opts); talk_about_time!("collecting data"); - prompt::Prompt::new(data).display(); + let w = std::io::stdout(); + prompt::Prompt::new(data).display(w); talk_about_time!("displaying data"); stop_talking_about_time!(); } @@ -51,6 +52,7 @@ mod tests { power_info: power::PowerInfo::new(), vcs_info: None, }; - prompt::Prompt::new(data).display(); + let w = vec![]; + prompt::Prompt::new(data).display(w); } } -- cgit v1.2.3-54-g00ecf