summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2019-01-26 13:40:12 -0500
committerAndrew Gallant <jamslam@gmail.com>2019-01-26 13:40:12 -0500
commit12a6ca45f9dad30864715dfecd917bb571b687d4 (patch)
treeac775c168f155502c0f79769163d5582d579812b /tests
parent9d703110cfe01782d2d0b03a340f5983da215e68 (diff)
config: add --no-ignore-dot flag
This flag causes ripgrep to ignore `.ignore` files. Closes #1138
Diffstat (limited to 'tests')
-rw-r--r--tests/feature.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/feature.rs b/tests/feature.rs
index d27fbf2f..1e7ecc48 100644
--- a/tests/feature.rs
+++ b/tests/feature.rs
@@ -629,3 +629,19 @@ rgtest!(f993_null_data, |dir: Dir, mut cmd: TestCommand| {
let expected = "foo\x00bar\x00baz\x00";
eqnice!(expected, cmd.stdout());
});
+
+// See: https://github.com/BurntSushi/ripgrep/issues/1138
+rgtest!(f1138_no_ignore_dot, |dir: Dir, mut cmd: TestCommand| {
+ dir.create_dir(".git");
+ dir.create(".gitignore", "foo");
+ dir.create(".ignore", "bar");
+ dir.create(".fzf-ignore", "quux");
+ dir.create("foo", "");
+ dir.create("bar", "");
+ dir.create("quux", "");
+
+ cmd.arg("--sort").arg("path").arg("--files");
+ eqnice!("quux\n", cmd.stdout());
+ eqnice!("bar\nquux\n", cmd.arg("--no-ignore-dot").stdout());
+ eqnice!("bar\n", cmd.arg("--ignore-file").arg(".fzf-ignore").stdout());
+});