Skip to content
Myr

test: add another regression test for gitignore matching bug

Before adoption: this commit came in with the history the project adopted, so no landing records it.

I believe this was also fixed by #2933. Closes #2770

authored by Andrew Gallant · committed by Andrew Gallant · parent fa80aab · Browse files · 2 files+16 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+16 added−0 removed

  • tests:+15 added−0 removed
  • other:+1 added−0 removed

2 files+16 added−0 removed

modified:tests/regression.rs+15 added
1453 unmodified lines
1454 let got = cmd.args(&["--null-data", "--line-regexp", r"bar"]).stdout();1455 eqnice!("haystack:bar\0", got);1456});14571458// See: https://github.com/BurntSushi/ripgrep/issues/27701459rgtest!(r2770_gitignore_error, |dir: Dir, _cmd: TestCommand| {1460 dir.create(".git", "");1461 dir.create(".gitignore", "**/bar/*");1462 dir.create_dir("foo/bar");1463 dir.create("foo/bar/baz", "quux");14641465 dir.command().arg("-l").arg("quux").assert_err();1466 dir.command()1467 .current_dir(dir.path().join("foo"))1468 .arg("-l")1469 .arg("quux")1470 .assert_err();1471});14721473// See: https://github.com/BurntSushi/ripgrep/pull/29441474rgtest!(r2944_incorrect_bytes_searched, |dir: Dir, mut cmd: TestCommand| {1475 dir.create("haystack", "foo1\nfoo2\nfoo3\nfoo4\nfoo5\n");1476 let got = cmd.args(&["--stats", "-m2", "foo", "."]).stdout();
160 unmodified lines
modified:CHANGELOG.md+1 added
10 unmodified lines
1112* [BUG #829](https://github.com/BurntSushi/ripgrep/issues/829),13 [BUG #2731](https://github.com/BurntSushi/ripgrep/issues/2731),14 [BUG #2747](https://github.com/BurntSushi/ripgrep/issues/2747),15 [BUG #2770](https://github.com/BurntSushi/ripgrep/issues/2770),16 [BUG #2778](https://github.com/BurntSushi/ripgrep/issues/2778),17 [BUG #2836](https://github.com/BurntSushi/ripgrep/issues/2836),18 [BUG #2933](https://github.com/BurntSushi/ripgrep/pull/2933),19 [BUG #3067](https://github.com/BurntSushi/ripgrep/pull/3067):
1767 unmodified lines