Closed ala-ableton closed 5 years ago
I have no clue about whether I should make any changes to the documentation (including CHANGELOG.md), so I left the 2 check boxes un-ticked for now.
Following the recent merges of #216 and #215, I've rebased and force-pushed my branch. @muggenhor, @paoloambrosio: please review, thanks!
@muggenhor: thank you for the review! Can you take care of merging this PR, or should we wait for @paoloambrosio to also have a look?
I'll probablyintend to merge it somewhere later this week
Hi @ala-ableton,
Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! 🍾
In return for this generous offer we hope you will:
On behalf of the Cucumber core team, Aslak Hellesøy Creator of Cucumber
Summary
Fixes a regression that was introduced in commit a7ff906 (Regex: use iterators for match results).
Details
Until commit a7ff906, the vector returned by
RegexMatch::getSubmatches()
contained an empty string item for each optional submatch that didn't match. Commit a7ff906 broke that behavior by skipping any submatch that didn't match.How Has This Been Tested?
I added a test (
matchesRegexWithOptionalSubmatches
) totests/unit/RegexTest.cpp
. I cherry-picked this test on top of 4dec371ca9a379cf762b32e94949d2bd39f2d77e (the parent commit of a7ff906ab379a055f4d9d06e1efdf00fc9434e72) and verified that it was passing. I then verified that this test doesn't pass on top of the latestmaster
without the corresponding change insrc/Regex.cpp
.Types of changes
Checklist: