summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordana <dana@dana.is>2017-08-09 05:53:35 -0500
committerAndrew Gallant <jamslam@gmail.com>2017-08-09 06:53:35 -0400
commit40bacbcd7ce3247cf778e52e9367e2d675e0f153 (patch)
tree9863dc3849fc2cd129df03f353342ec17434af5f /tests
parentb3a9c34515ec087bb7325db81f60ce26aeee3fd9 (diff)
Add -x/--line-regexp (#520)
add -x/--line-regexp flag
Diffstat (limited to 'tests')
-rw-r--r--tests/tests.rs10
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");