Skip to content

std.regex: drop redundant bmatch run from the test suite#11046

Open
kubo39 wants to merge 2 commits into
dlang:masterfrom
kubo39:std-regex-drop-redundant-bmatch-test
Open

std.regex: drop redundant bmatch run from the test suite#11046
kubo39 wants to merge 2 commits into
dlang:masterfrom
kubo39:std-regex-drop-redundant-bmatch-test

Conversation

@kubo39

@kubo39 kubo39 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Rationale

match and bmatch are equivalent (both pick the engine from the pattern), so running run_tests!match() only.

Pre-review checklist

  • I have performed a self-review of my code.
  • [ ] If my PR fixes a bug or introduces a new feature, I have added thorough tests.
  • [ ] If my changes are non-trivial and do not concern a reported issue, I have added a changelog entry.

match and bmatch are equivalent (both pick the engine from the pattern), so
running run_tests!match() only.
@kubo39 kubo39 requested a review from DmitryOlshansky as a code owner June 28, 2026 11:54

@DmitryOlshansky DmitryOlshansky left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since engines are picked from pattern it makes it truly important to run all engines in test suit. So just dropping bmatch is not a good solution, what is needed is a way to pick engine at least internally.

@kubo39

kubo39 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

At first I thought, but since that pattern — explicitly forcing the backtracking engine — can't be reached through the public API, I wonder if it's worth it.

@DmitryOlshansky

Copy link
Copy Markdown
Member

It's not public but the engine better be tested even if currently it is not selected for the pattern.

@thewilsonator

Copy link
Copy Markdown
Contributor

It wold seem to me the solution here is (potentially via a private API) to force the engine irrespective of the pattern, and then test all of the engines on whatever the set of patterns comprise the test suite.

@kubo39

kubo39 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

Okay, I'll add the internal helper later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants