Hack in Windows console coloring.

The code has suffered and needs refactoring/commenting. BUT... IT WORKS!
This commit is contained in:
Andrew Gallant
2016-09-07 21:54:28 -04:00
parent ca058d7584
commit 0042dce949
6 changed files with 215 additions and 31 deletions

View File

@@ -687,6 +687,7 @@ mod tests {
use std::path::Path;
use grep::{Grep, GrepBuilder};
use term::Terminal;
use printer::Printer;
@@ -745,7 +746,7 @@ fn main() {
&mut inp, &mut pp, &grep, test_path(), hay(haystack));
map(searcher).run().unwrap()
};
(count, String::from_utf8(pp.into_inner()).unwrap())
(count, String::from_utf8(pp.into_inner().into_inner()).unwrap())
}
fn search<F: FnMut(TestSearcher) -> TestSearcher>(
@@ -761,7 +762,7 @@ fn main() {
&mut inp, &mut pp, &grep, test_path(), hay(haystack));
map(searcher).run().unwrap()
};
(count, String::from_utf8(pp.into_inner()).unwrap())
(count, String::from_utf8(pp.into_inner().into_inner()).unwrap())
}
#[test]