Skip to content

Commit

Permalink
Update regex to include old scenarios where matching for GB18030 char…
Browse files Browse the repository at this point in the history
…acters worked
  • Loading branch information
DavidARaygoza committed Aug 13, 2024
1 parent 00f4232 commit c408166
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions GoogleTestAdapter/Core/TestCases/StreamingListTestsParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ namespace GoogleTestAdapter.TestCases

public class StreamingListTestsParser
{
private static readonly Regex SuiteRegex = new Regex($@"([^.\s]*(?:\.[\S]+)*)(?:{Regex.Escape(GoogleTestConstants.TypedTestMarker)}(.*))?", RegexOptions.Compiled);
private static readonly Regex NameRegex = new Regex($@"([\S]*)(?:{Regex.Escape(GoogleTestConstants.ParameterizedTestMarker)}(.*))?", RegexOptions.Compiled);
private static readonly string SuiteInitialRegex = @"((?:[\w\/\p{Nl}]*|[^.\s]*)+(?:\.[\w\/\p{Nl}]+|\.[^.\s]+)*)";
private static readonly string NameInitialRegex = @"((?:[\w\/\p{Nl}]*|[\S]*)*)";
private static readonly Regex SuiteRegex = new Regex($@"{SuiteInitialRegex}(?:{Regex.Escape(GoogleTestConstants.TypedTestMarker)}(.*))?", RegexOptions.Compiled);
private static readonly Regex NameRegex = new Regex($@"{NameInitialRegex}(?:{Regex.Escape(GoogleTestConstants.ParameterizedTestMarker)}(.*))?", RegexOptions.Compiled);
private static readonly Regex IsParamRegex = new Regex(@"(\w+/)?\w+/\d+", RegexOptions.Compiled);

private readonly string _testNameSeparator;
Expand Down

0 comments on commit c408166

Please sign in to comment.