Add -x/--line-regexp (#520)

add -x/--line-regexp flag
This commit is contained in:
dana
2017-08-09 05:53:35 -05:00
committed by Andrew Gallant
parent b3a9c34515
commit 40bacbcd7c
7 changed files with 48 additions and 8 deletions

View File

@@ -209,6 +209,16 @@ For the Doctor Watsons of this world, as opposed to the Sherlock
assert_eq!(lines, expected);
});
sherlock!(line, "Watson|and exhibited clearly, with a label attached.",
|wd: WorkDir, mut cmd: Command| {
cmd.arg("-x");
let lines: String = wd.stdout(&mut cmd);
let expected = "\
and exhibited clearly, with a label attached.
";
assert_eq!(lines, expected);
});
sherlock!(literal, "()", "file", |wd: WorkDir, mut cmd: Command| {
wd.create("file", "blib\n()\nblab\n");
cmd.arg("-F");