Skip to content

Adding PCRE2 tests to increase Regex code coverage - #73323

Merged
joperezr merged 3 commits into
dotnet:mainfrom
joperezr:AddPCRETests
Aug 5, 2022
Merged

joperezr merged 3 commits into
dotnet:mainfrom
joperezr:AddPCRETests

Conversation

@joperezr

@joperezr joperezr commented Aug 3, 2022

Copy link
Copy Markdown
Member

Fixes #61893

This PR is adding all of the tests from the https://github.com/PCRE2Project/pcre2/testdata repo that can be parsed by our engine and don't rely on special syntax not supported by .NET (like [[:digit:]] syntax for example which we are able to parse, but it semantically means something different in our case)

I have already separately logged the issues I found in .NET while porting these (and most of them are already addressed by @stephentoub 😄). I also used Steve's technique for batching source-generator engine tests which helped bringing this single test execution from 2.3 minutes down to 1.1 seconds, which is why this test doesn't need to be moved to outerloop. In total, this is adding around 11K different tests into our test suite.

cc: @richlander since I'm updating one of our THIRD-PARTY-NOTICES file.

@ghost

ghost commented Aug 3, 2022

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #61893

This PR is adding all of the tests from the https://github.com/PCRE2Project/pcre2/testdata repo that can be parsed by our engine and don't rely on special syntax not supported by .NET (like [[:digit:]] syntax for example which we are able to parse, but it semantically means something different in our case)

I have already separately logged the issues I found in .NET while porting these (and most of them are already addressed by @stephentoub 😄). I also used Steve's technique for batching source-generator engine tests which helped bringing this single test execution from 2.3 minutes down to 1.1 seconds, which is why this test doesn't need to be moved to outerloop. In total, this is adding around 11K different tests into our test suite.

cc: @richlander since I'm updating one of our THIRD-PARTY-NOTICES file.

Author: joperezr
Assignees: -
Labels:

area-System.Text.RegularExpressions

Milestone: -

@stephentoub stephentoub 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.

Excellent.

@danmoseley

Copy link
Copy Markdown
Contributor

Nice!

@joperezr

joperezr commented Aug 5, 2022

Copy link
Copy Markdown
Member Author

PR was green in the previous commit, and last one only addressed feedback on re-wording of comments, so I'll go ahead and merge now

@joperezr
joperezr merged commit 7f31799 into dotnet:main Aug 5, 2022
@joperezr
joperezr deleted the AddPCRETests branch August 5, 2022 19:33
@ghost ghost locked as resolved and limited conversation to collaborators Sep 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port pcre2 regex tests

4 participants