diff options
author | Andrew Gallant <jamslam@gmail.com> | 2023-10-09 18:23:36 -0400 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2023-10-09 20:29:52 -0400 |
commit | 9626f167573527858f9736a3054882de87d6cd79 (patch) | |
tree | 83a5bd062eff724bc857d8b83b7c008cba882ad9 /tests | |
parent | f7ff34fdf9d2853f9763aceb28f5dcb014728045 (diff) |
progress
Diffstat (limited to 'tests')
-rw-r--r-- | tests/misc.rs | 12 | ||||
-rw-r--r-- | tests/regression.rs | 9 |
2 files changed, 13 insertions, 8 deletions
diff --git a/tests/misc.rs b/tests/misc.rs index 4fa8632e..40779056 100644 --- a/tests/misc.rs +++ b/tests/misc.rs @@ -144,6 +144,18 @@ For the Doctor Watsons of this world, as opposed to the Sherlock eqnice!(expected, cmd.stdout()); }); +rgtest!(word_period, |dir: Dir, mut cmd: TestCommand| { + dir.create("haystack", "..."); + cmd.arg("-ow").arg(".").arg("haystack"); + + let expected = "\ +. +. +. +"; + eqnice!(expected, cmd.stdout()); +}); + rgtest!(line, |dir: Dir, mut cmd: TestCommand| { dir.create("sherlock", SHERLOCK); cmd.args(&[ diff --git a/tests/regression.rs b/tests/regression.rs index 24551fc0..994006a7 100644 --- a/tests/regression.rs +++ b/tests/regression.rs @@ -1046,17 +1046,10 @@ rgtest!(r1878, |dir: Dir, _: TestCommand| { // See: https://github.com/BurntSushi/ripgrep/issues/1891 rgtest!(r1891, |dir: Dir, mut cmd: TestCommand| { - // TODO: Sadly, PCRE2 has different behavior here. Not clear why. We should - // look into this and see if there's a fix needed at the regex engine - // level. - if dir.is_pcre2() { - return; - } - dir.create("test", "\n##\n"); // N.B. We use -o here to force the issue to occur, which seems to only // happen when each match needs to be detected. - eqnice!("1:\n2:\n2:\n", cmd.args(&["-won", "", "test"]).stdout()); + eqnice!("1:\n2:\n2:\n2:\n", cmd.args(&["-won", "", "test"]).stdout()); }); // See: https://github.com/BurntSushi/ripgrep/issues/2095 |