jurassic
jurassic copied to clipboard
UnitTest on DotnetCore : Regex
Hi,
I have a error in a unit test on dotnet core.
File RegExpTests, method compile(), line Evaluate("x.compile('cde')");
The error is in RegExpInstance, when calling Compile("cde", null), at new Regex(pattern, ParseFlags(flags) | RegexOptions.Compiled);
It seams that the ECMAScript flag is causing this issue.
Here seams to be the revealant code in the dotnet core framework : https://github.com/dotnet/corefx/blob/master/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Regex.cs#L174-L184
Hmm, I'm only using the IgnoreCase, Multiline and Compiled flag, all of which should be allowed in conjunction with ECMAScript flag. Weird.
You can give it a try in PR #75