diff options
author | Jesse Luehrs <doy@tozt.net> | 2018-05-14 19:19:36 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2018-05-14 19:19:36 -0400 |
commit | f22fd3a3fc606d94f68386526f6e4fd56ab7a3b2 (patch) | |
tree | c4be0e8f6b8266f8921d9f584a238802b55f82dd /src/main.rs | |
parent | e28033a794f70f0051c5d47651da90830dd6d1ad (diff) | |
download | fancy-prompt-f22fd3a3fc606d94f68386526f6e4fd56ab7a3b2.tar.gz fancy-prompt-f22fd3a3fc606d94f68386526f6e4fd56ab7a3b2.zip |
suppress output when testing rendering
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 4 insertions, 2 deletions
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); } } |