Add --smart-case.

It does what it says on the tin.

Closes #70.
This commit is contained in:
Andrew Gallant
2016-09-24 21:51:04 -04:00
parent 8eeb0c0b60
commit 1595f0faf5
5 changed files with 63 additions and 1 deletions

View File

@@ -699,6 +699,18 @@ clean!(feature_68, "test", ".", |wd: WorkDir, mut cmd: Command| {
assert_eq!(lines, "foo:test\n");
});
// See: https://github.com/BurntSushi/ripgrep/issues/70
sherlock!(feature_70, "sherlock", ".", |wd: WorkDir, mut cmd: Command| {
cmd.arg("--smart-case");
let lines: String = wd.stdout(&mut cmd);
let expected = "\
sherlock:For the Doctor Watsons of this world, as opposed to the Sherlock
sherlock:be, to a very large extent, the result of luck. Sherlock Holmes
";
assert_eq!(lines, expected);
});
#[test]
fn binary_nosearch() {
let wd = WorkDir::new("binary_nosearch");