-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Fix parsing of regex alternation construct with named options #16609
Conversation
|
@dotnet-bot test innerloop windows_nt release build and test (https://github.com/dotnet/corefx/issues/16489) |
| [InlineData("(?(?x))", RegexOptions.None, typeof(NullReferenceException))] | ||
| [InlineData("(?(?X))", RegexOptions.None, typeof(NullReferenceException))] | ||
| [InlineData("(?(?e))", RegexOptions.None, typeof(NullReferenceException))] | ||
| [InlineData(" (?(?e))", RegexOptions.None, typeof(OutOfMemoryException))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why e ? missing n.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a bad test, I've updated them in the latest commit
| [InlineData(" (?(?e))", RegexOptions.None, typeof(OutOfMemoryException))] | ||
| public void Ctor_InvalidPattern_NetCore(string pattern, RegexOptions options, Type exceptionType) | ||
| { | ||
| if (RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename the method to not have NetCore, since the test is also testing behavior on framework?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Priya91
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix!
|
@dotnet-bot Test Innerloop Windows_NT Debug Build and Test |
…/corefx#16609) * Fix parsing of regex alternation construct with named options * Address PR feedback, correct some tests Commit migrated from dotnet/corefx@353bdc6
Fixes #1476
I've tried to add a bunch of targetted tests as well as a bunch of fuzzer-style tests. Let me know if you have any suggestions for others.