I\'ve implemented the following method and unit test:
use std::fs::File; use std::path::Path; use std::io::prelude::*; fn read_file(path: &Path) { l
To include print outs with println!() and keep colors for the test results, use the color and nocapture flags in cargo test.
println!()
color
nocapture
cargo test
$ cargo test -- --color always --nocapture
(cargo version: 0.13.0 nightly)