Skip to content

Commit

Permalink
Add a hint about what to try first when regexp tests are failing (#425)
Browse files Browse the repository at this point in the history
  • Loading branch information
adams85 authored Nov 28, 2023
1 parent 71c9677 commit 3704fb5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/Esprima.Tests/RegExpTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,9 @@ public static IEnumerable<object[]> TestCases(string relativePath)
[MemberData(nameof(TestCases), "Fixtures.RegExp")]
public void ExecuteTestCase(string pattern, string flags, string expectedAdaptedPattern, string testString, string expectedMatchesJson, string hints)
{
// When upgrading .NET runtime version, it's expected that some of the tests may fail because the regexp rewriting logic
// uses some Unicode-related APIs provided by .NET and the underlying Unicode datasets may be updated between .NET versions.
// So, in the case of failing tests, try to re-generate the test cases first.
// To re-generate test cases, execute `dotnet run --project Fixtures.RegExp\Generator -c Release`

static string DecodeStringIfEscaped(string value) => JavaScriptStringHelper.IsStringLiteral(value)
Expand Down

0 comments on commit 3704fb5

Please sign in to comment.