jurassic icon indicating copy to clipboard operation
jurassic copied to clipboard

UnitTest on DotnetCore : Regex

Open maitredede opened this issue 8 years ago • 2 comments
trafficstars

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

maitredede avatar Dec 19 '16 02:12 maitredede

Hmm, I'm only using the IgnoreCase, Multiline and Compiled flag, all of which should be allowed in conjunction with ECMAScript flag. Weird.

paulbartrum avatar Dec 19 '16 02:12 paulbartrum

You can give it a try in PR #75

maitredede avatar Dec 19 '16 02:12 maitredede