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 <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin 2013-12-06 10:50:34 -06:00
parent d17bbc6d1b
commit d8d980be9a

View File

@ -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");