joyful_minigrep 0.1.3

grep but mini and colored though
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::process::Command;

#[test]
fn it_works() {
    let output = Command::new("cargo")
        .args(["run", "body", "poem.txt"])
        .output()
        .expect("Failed to run minigrep!");

    let r = String::from_utf8(output.stdout).unwrap();

    assert_eq!(r,"Found 3 Matches for `body` in poem.txt:\n1. I'm nobody! Who are you?\n2. Are you nobody, too?\n6. How dreary to be somebody!\n")
}