Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

@hughbe
Copy link

@hughbe hughbe commented Mar 2, 2017

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.

@danmoseley
Copy link
Member

@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))]
Copy link
Contributor

Choose a reason for hiding this comment

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

Why e ? missing n.

Copy link
Author

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"))
Copy link
Contributor

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?

Copy link
Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Contributor

@Priya91 Priya91 left a 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!

@hughbe
Copy link
Author

hughbe commented Mar 3, 2017

@dotnet-bot Test Innerloop Windows_NT Debug Build and Test

@danmoseley danmoseley merged commit 353bdc6 into dotnet:master Mar 3, 2017
@hughbe hughbe deleted the regex-fixes branch March 4, 2017 02:35
@karelz karelz modified the milestone: 2.0.0 Mar 6, 2017
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…/corefx#16609)

* Fix parsing of regex alternation construct with named options

* Address PR feedback, correct some tests


Commit migrated from dotnet/corefx@353bdc6
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.

6 participants