Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'main/tests/UnitTests/MonoDevelop.Core/BacktrackingStringMatcherTests.cs')
-rw-r--r--main/tests/UnitTests/MonoDevelop.Core/BacktrackingStringMatcherTests.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/main/tests/UnitTests/MonoDevelop.Core/BacktrackingStringMatcherTests.cs b/main/tests/UnitTests/MonoDevelop.Core/BacktrackingStringMatcherTests.cs
index 4fd2ad602d..3cda234a7e 100644
--- a/main/tests/UnitTests/MonoDevelop.Core/BacktrackingStringMatcherTests.cs
+++ b/main/tests/UnitTests/MonoDevelop.Core/BacktrackingStringMatcherTests.cs
@@ -30,6 +30,7 @@ using System.Linq;
namespace MonoDevelop.Core
{
+ [TestFixture]
public class BacktrackingStringMatcherTests
{
[Test()]
@@ -87,6 +88,20 @@ namespace MonoDevelop.Core
CompareMatch(match, "*****--");
}
+
+ [Test()]
+ public void TestBacktrackBug ()
+ {
+ var matcher = StringMatcher.GetMatcher ("dlli", true);
+ var match = matcher.GetMatch("DllList");
+ CompareMatch(match, "**-**--");
+
+ matcher = StringMatcher.GetMatcher ("dLli", true);
+ match = matcher.GetMatch("DllList");
+ Assert.IsNull (match, "match found");
+ }
+
+
[Test()]
public void TestUnderscoreAtEnd ()
{