regex: fix another inner literal bug

It looks like `is_simple` wasn't quite correct.

I can't wait until this code is rewritten. It is still not quite clearly
correct to me.

Fixes #1537
This commit is contained in:
Andrew Gallant
2020-04-01 20:34:39 -04:00
parent 3d6a58faff
commit 1c4b5adb7b
3 changed files with 31 additions and 6 deletions

View File

@@ -791,3 +791,11 @@ rgtest!(
eqnice!("repotree/not-ignored\n", cmd.stdout());
}
);
// See: https://github.com/BurntSushi/ripgrep/issues/1537
rgtest!(r1537, |dir: Dir, mut cmd: TestCommand| {
dir.create("foo", "abc;de,fg");
let expected = "foo:abc;de,fg\n";
eqnice!(expected, cmd.arg(";(.*,){1}").stdout());
});