Skip to content
Prev Previous commit
Next Next commit
Remove assert and add unit test
  • Loading branch information
Prashanth Govindarajan authored and github-actions committed Jul 19, 2021
commit a0154702166484e06564885c1115165e3998b919
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,6 @@ protected override void Go()
if (len > i && _operator == RegexCode.Notoneloop)
{
TrackPush(len - i - 1, runtextpos - Bump());
Debug.Assert(_maxBacktrackPosition == -1, $"maxBacktrackPosition = {_maxBacktrackPosition}, runtext = {runtext}, runtextpos = {runtextpos}, ch = {ch}, code = {_code}, runregex = {runregex}");
_maxBacktrackPosition = tempMaxBacktrackPosition;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ public static IEnumerable<object[]> Match_Basic_TestData()

// Using *, +, ?, {}: Actual - "a+\\.?b*\\.?c{2}"
yield return new object[] { @"a+\.?b*\.+c{2}", "ab.cc", RegexOptions.None, 0, 5, true, "ab.cc" };
yield return new object[] { @"[^a]+\.[^z]+", "zzzzz", RegexOptions.None, 0, 5, false, string.Empty };

// RightToLeft
yield return new object[] { @"\s+\d+", "sdf 12sad", RegexOptions.RightToLeft, 0, 9, true, " 12" };
Expand Down