-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a unit test from aspnetcore #56108
Conversation
Tagging subscribers to this area: @eerhardt, @dotnet/area-system-text-regularexpressions Issue DetailsJust adding a unit test to our tests.
|
src/libraries/System.Text.RegularExpressions/tests/Regex.Groups.Tests.cs
Outdated
Show resolved
Hide resolved
f74ea0f
to
ffa17d6
Compare
src/libraries/System.Text.RegularExpressions/tests/Regex.Groups.Tests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.RegularExpressions/tests/Regex.Groups.Tests.cs
Outdated
Show resolved
Hide resolved
GH won't let me approve this PR since I opened it. The changes look good to me. There are interesting patterns to add with |
Hello @jeffhandley! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Thanks, @pgovind. Good thinking on I noticed that there's very little coverage of negative scenarios where matches are unsuccessful. One of the mistakes I made yesterday was assuming I could cover such scenarios within the group tests, but that's not in place--the test method assumes every scenario is a successful match. There are a few other tests in this feature area for unsuccessful matches, but nowhere near the coverage we have in these group tests. I held back from updating this particular test suite to capture such scenarios. |
Failure is unrelated and infrastructural. |
Add a unit test that covers a critical scenario from ASP.NET. This scenario was identified when #51508 was merged in and caused a regression in ASP.NET, as reported when the change was backported to preview 7. That regression was first observed in dotnet/aspnetcore#34491.
Rule:
(.*)/(.*).aspx
Input:
/pages/homepage.aspx
Expected backreferences:
Actual backreferences: None, didn't match
This scenario represents multiple
.*
groups within a pattern and being able to capture all expected backreferences.