mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-23 15:55:04 -10:00
3 files changed
+18
No files matched your search
+4
@@ -562,6 +562,10 @@ namespace System.Text.RegularExpressions
|
||||
{
|
||||
charClass!.Negate = true;
|
||||
}
|
||||
if ((_options & RegexOptions.ECMAScript) != 0 && CharAt(_currentPos) == ']')
|
||||
{
|
||||
firstChar = false;
|
||||
}
|
||||
}
|
||||
|
||||
for (; CharsRight() > 0; firstChar = false)
|
||||
|
||||
@@ -140,6 +140,19 @@ namespace System.Text.RegularExpressions.Tests
|
||||
new CaptureData("C789", 10, 4),
|
||||
}
|
||||
};
|
||||
|
||||
yield return new object[]
|
||||
{
|
||||
"[^]", "every", RegexOptions.ECMAScript,
|
||||
new CaptureData[]
|
||||
{
|
||||
new CaptureData("e", 0, 1),
|
||||
new CaptureData("v", 1, 1),
|
||||
new CaptureData("e", 2, 1),
|
||||
new CaptureData("r", 3, 1),
|
||||
new CaptureData("y", 4, 1),
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
[Theory]
|
||||
|
||||
@@ -713,6 +713,7 @@ namespace System.Text.RegularExpressions.Tests
|
||||
[InlineData(@"\d{2147483648}", RegexOptions.None, RegexParseError.CaptureGroupOutOfRange)]
|
||||
[InlineData("[a-z-[b][", RegexOptions.None, RegexParseError.UnterminatedBracket)]
|
||||
[InlineData("(?()|||||)", RegexOptions.None, RegexParseError.TooManyAlternates)]
|
||||
[InlineData("[^]", RegexOptions.None, RegexParseError.UnterminatedBracket)]
|
||||
public void Parse(string pattern, RegexOptions options, object errorObj)
|
||||
{
|
||||
RegexParseError? error = (RegexParseError?)errorObj;
|
||||
|
||||
Reference in new issue
Block a user