test: add another regression test for gitignore matching bug
I believe this was also fixed by #2933. Closes #2770
This commit is contained in:
@@ -12,6 +12,7 @@ Bug fixes:
|
|||||||
* [BUG #829](https://github.com/BurntSushi/ripgrep/issues/829),
|
* [BUG #829](https://github.com/BurntSushi/ripgrep/issues/829),
|
||||||
[BUG #2731](https://github.com/BurntSushi/ripgrep/issues/2731),
|
[BUG #2731](https://github.com/BurntSushi/ripgrep/issues/2731),
|
||||||
[BUG #2747](https://github.com/BurntSushi/ripgrep/issues/2747),
|
[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 #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),
|
||||||
|
|||||||
@@ -1455,6 +1455,21 @@ rgtest!(r2658_null_data_line_regexp, |dir: Dir, mut cmd: TestCommand| {
|
|||||||
eqnice!("haystack:bar\0", got);
|
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
|
// See: https://github.com/BurntSushi/ripgrep/pull/2944
|
||||||
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");
|
||||||
|
|||||||
Reference in New Issue
Block a user