1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-11-23 21:54:45 +02:00

test: add another regression test for gitignore matching bug

I believe this was also fixed by #2933.

Closes #2770
This commit is contained in:
Andrew Gallant
2025-10-10 21:06:01 -04:00
parent fa80aab6b0
commit 293ef80eaf
2 changed files with 16 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ Bug fixes:
* [BUG #829](https://github.com/BurntSushi/ripgrep/issues/829),
[BUG #2731](https://github.com/BurntSushi/ripgrep/issues/2731),
[BUG #2747](https://github.com/BurntSushi/ripgrep/issues/2747),
[BUG #2770](https://github.com/BurntSushi/ripgrep/issues/2770),
[BUG #2778](https://github.com/BurntSushi/ripgrep/issues/2778),
[BUG #2836](https://github.com/BurntSushi/ripgrep/issues/2836),
[BUG #2933](https://github.com/BurntSushi/ripgrep/pull/2933),

View File

@@ -1455,6 +1455,21 @@ rgtest!(r2658_null_data_line_regexp, |dir: Dir, mut cmd: TestCommand| {
eqnice!("haystack:bar\0", got);
});
// See: https://github.com/BurntSushi/ripgrep/issues/2770
rgtest!(r2770_gitignore_error, |dir: Dir, _cmd: TestCommand| {
dir.create(".git", "");
dir.create(".gitignore", "**/bar/*");
dir.create_dir("foo/bar");
dir.create("foo/bar/baz", "quux");
dir.command().arg("-l").arg("quux").assert_err();
dir.command()
.current_dir(dir.path().join("foo"))
.arg("-l")
.arg("quux")
.assert_err();
});
// See: https://github.com/BurntSushi/ripgrep/pull/2944
rgtest!(r2944_incorrect_bytes_searched, |dir: Dir, mut cmd: TestCommand| {
dir.create("haystack", "foo1\nfoo2\nfoo3\nfoo4\nfoo5\n");