Remove logging calls in favour of debug calls

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2018-11-01 21:35:40 +01:00
parent b4068bad0e
commit cb0fcaffde

View file

@ -69,8 +69,14 @@ pub fn entry_buffer_to_header_content(buf: &str) -> Result<(Value, String)> {
#[cfg(test)] #[cfg(test)]
mod test { mod test {
extern crate env_logger;
use super::entry_buffer_to_header_content; use super::entry_buffer_to_header_content;
fn setup_logging() {
let _ = env_logger::try_init();
}
fn mkfile(content: &str) -> String { fn mkfile(content: &str) -> String {
format!(r#"--- format!(r#"---
[imag] [imag]
@ -97,16 +103,17 @@ version = '{version}'
#[test] #[test]
fn test_entry_buffer_to_header_content_2() { fn test_entry_buffer_to_header_content_2() {
setup_logging();
let content = r#"Hai let content = r#"Hai
"#; "#;
let file = mkfile(&content); let file = mkfile(&content);
eprintln!("FILE: <<<{}>>>", file); debug!("FILE: <<<{}>>>", file);
let res = entry_buffer_to_header_content(&file); let res = entry_buffer_to_header_content(&file);
assert!(res.is_ok()); assert!(res.is_ok());
let (_, res_content) = res.unwrap(); let (_, res_content) = res.unwrap();
eprintln!("CONTENT: <<<{}>>>", res_content); debug!("CONTENT: <<<{}>>>", res_content);
assert_eq!(res_content, content) assert_eq!(res_content, content)
} }