test: add regression test for fixed gitignore bug
I believe this was actually fixed by #2933. Closes #3067
This commit is contained in:
@@ -14,7 +14,8 @@ Bug fixes:
|
|||||||
[BUG #2747](https://github.com/BurntSushi/ripgrep/issues/2747),
|
[BUG #2747](https://github.com/BurntSushi/ripgrep/issues/2747),
|
||||||
[BUG #2778](https://github.com/BurntSushi/ripgrep/issues/2778),
|
[BUG #2778](https://github.com/BurntSushi/ripgrep/issues/2778),
|
||||||
[BUG #2836](https://github.com/BurntSushi/ripgrep/issues/2836),
|
[BUG #2836](https://github.com/BurntSushi/ripgrep/issues/2836),
|
||||||
[BUG #2933](https://github.com/BurntSushi/ripgrep/pull/2933):
|
[BUG #2933](https://github.com/BurntSushi/ripgrep/pull/2933),
|
||||||
|
[BUG #3067](https://github.com/BurntSushi/ripgrep/pull/3067):
|
||||||
Fix bug related to gitignores from parent directories.
|
Fix bug related to gitignores from parent directories.
|
||||||
* [BUG #1332](https://github.com/BurntSushi/ripgrep/issues/1332),
|
* [BUG #1332](https://github.com/BurntSushi/ripgrep/issues/1332),
|
||||||
[BUG #3001](https://github.com/BurntSushi/ripgrep/issues/3001):
|
[BUG #3001](https://github.com/BurntSushi/ripgrep/issues/3001):
|
||||||
|
|||||||
@@ -1459,7 +1459,6 @@ rgtest!(r2658_null_data_line_regexp, |dir: Dir, mut cmd: TestCommand| {
|
|||||||
rgtest!(r2944_incorrect_bytes_searched, |dir: Dir, mut cmd: TestCommand| {
|
rgtest!(r2944_incorrect_bytes_searched, |dir: Dir, mut cmd: TestCommand| {
|
||||||
dir.create("haystack", "foo1\nfoo2\nfoo3\nfoo4\nfoo5\n");
|
dir.create("haystack", "foo1\nfoo2\nfoo3\nfoo4\nfoo5\n");
|
||||||
let got = cmd.args(&["--stats", "-m2", "foo", "."]).stdout();
|
let got = cmd.args(&["--stats", "-m2", "foo", "."]).stdout();
|
||||||
println!("{got}");
|
|
||||||
assert!(got.contains("10 bytes searched\n"));
|
assert!(got.contains("10 bytes searched\n"));
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1479,6 +1478,19 @@ rgtest!(r2990_trip_over_trailing_dot, |dir: Dir, _cmd: TestCommand| {
|
|||||||
eqnice!("asdf/foo\n", got);
|
eqnice!("asdf/foo\n", got);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// See: https://github.com/BurntSushi/ripgrep/issues/3067
|
||||||
|
rgtest!(r3067_gitignore_error, |dir: Dir, mut cmd: TestCommand| {
|
||||||
|
dir.create(".git", "");
|
||||||
|
dir.create(".gitignore", "foobar/debug");
|
||||||
|
dir.create_dir("foobar/some/debug");
|
||||||
|
dir.create_dir("foobar/debug");
|
||||||
|
dir.create("foobar/some/debug/flag", "baz");
|
||||||
|
dir.create("foobar/debug/flag2", "baz");
|
||||||
|
|
||||||
|
let got = cmd.arg("baz").stdout();
|
||||||
|
eqnice!("foobar/some/debug/flag:baz\n", got);
|
||||||
|
});
|
||||||
|
|
||||||
// See: https://github.com/BurntSushi/ripgrep/issues/3108
|
// See: https://github.com/BurntSushi/ripgrep/issues/3108
|
||||||
rgtest!(r3108_files_without_match_quiet_exit, |dir: Dir, _: TestCommand| {
|
rgtest!(r3108_files_without_match_quiet_exit, |dir: Dir, _: TestCommand| {
|
||||||
dir.create("yes-match", "abc");
|
dir.create("yes-match", "abc");
|
||||||
|
|||||||
Reference in New Issue
Block a user