Add --no-ignore-vcs flag.

This flag will respect .ignore but not .gitignore.

Closes #68.
This commit is contained in:
Andrew Gallant
2016-09-24 21:31:24 -04:00
parent 423f2a1927
commit 8eeb0c0b60
5 changed files with 58 additions and 6 deletions

View File

@@ -687,6 +687,18 @@ be, to a very large extent, the result of luck. Sherlock Holmes
assert_eq!(lines, expected);
});
// See: https://github.com/BurntSushi/ripgrep/issues/68
clean!(feature_68, "test", ".", |wd: WorkDir, mut cmd: Command| {
wd.create(".gitignore", "foo");
wd.create(".ignore", "bar");
wd.create("foo", "test");
wd.create("bar", "test");
cmd.arg("--no-ignore-vcs");
let lines: String = wd.stdout(&mut cmd);
assert_eq!(lines, "foo:test\n");
});
#[test]
fn binary_nosearch() {
let wd = WorkDir::new("binary_nosearch");