diff options
author | dana <dana@dana.is> | 2017-08-09 05:53:35 -0500 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2017-08-09 06:53:35 -0400 |
commit | 40bacbcd7ce3247cf778e52e9367e2d675e0f153 (patch) | |
tree | 9863dc3849fc2cd129df03f353342ec17434af5f /tests | |
parent | b3a9c34515ec087bb7325db81f60ce26aeee3fd9 (diff) |
Add -x/--line-regexp (#520)
add -x/--line-regexp flag
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tests.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/tests.rs b/tests/tests.rs index ddc4d196..ecf83640 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -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"); |