From d8d980be9a1b2bb98e3bb2b4292c566e4f4b8bc0 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 6 Dec 2013 10:50:34 -0600 Subject: [PATCH] Fix the look-behind test for OpenJDK OpenJDK's regex engine can only handle look-behinds of limited sizes. So let's just test for that, not the unbounded one we had before (that our own regex engine handles quite fine, though). This fixes issue #115. Signed-off-by: Johannes Schindelin --- test/Regex.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Regex.java b/test/Regex.java index 22108dde5a..f67413978c 100644 --- a/test/Regex.java +++ b/test/Regex.java @@ -70,7 +70,7 @@ public class Regex { expectGroups("a|(b|c)", "a", (String)null); expectGroups("a|(b|c)", "c", "c"); expectGroups("(?=a)a", "a"); - expectGroups(".*(o)(?<=[A-Z][a-z]*)", "Hello", "o"); + expectGroups(".*(o)(?<=[A-Z][a-z]{1,4})", "Hello", "o"); expectNoMatch("(?!a).", "a"); expectMatch("[\\d]", "0"); expectMatch("\\0777", "?7");