[jruby-joni] 32/194: allow option in look-behind

Hideki Yamane henrich at moszumanska.debian.org
Thu Feb 1 12:04:14 UTC 2018


This is an automated email from the git hooks/post-receive script.

henrich pushed a commit to branch debian/sid
in repository jruby-joni.

commit 0dc76840d3cddf2464a3231cd3f6810bf940306e
Author: Marcin Mielzynski <lopx at gazeta.pl>
Date:   Tue Dec 26 20:00:53 2017 +0100

    allow option in look-behind
---
 src/org/joni/constants/EncloseType.java |  4 ++--
 test/org/joni/test/TestU8.java          | 11 +++++++++++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/org/joni/constants/EncloseType.java b/src/org/joni/constants/EncloseType.java
index 13d42b6..7927545 100644
--- a/src/org/joni/constants/EncloseType.java
+++ b/src/org/joni/constants/EncloseType.java
@@ -25,6 +25,6 @@ public interface EncloseType {
     final int STOP_BACKTRACK        = 1<<2;
     final int CONDITION             = 1<<3;
 
-    final int ALLOWED_IN_LB         = MEMORY;
-    final int ALLOWED_IN_LB_NOT     = 0;
+    final int ALLOWED_IN_LB         = MEMORY | OPTION;
+    final int ALLOWED_IN_LB_NOT     = OPTION;
 }
diff --git a/test/org/joni/test/TestU8.java b/test/org/joni/test/TestU8.java
index e6458c2..942608f 100755
--- a/test/org/joni/test/TestU8.java
+++ b/test/org/joni/test/TestU8.java
@@ -171,6 +171,17 @@ public class TestU8 extends Test {
         x2s("(?i)\u0149\u0149", "\u0149\u0149", 0, 4);
         x2s("(?i)(?<=\u0149)a", "\u02bcna", 3, 4);
 
+        x2s("(?<=(?i)ab)cd", "ABcd", 2, 4);
+
+        x2s("(?<=(?i)ab)cd", "ABcd", 2, 4);
+        x2s("(?<=(?i:ab))cd", "ABcd", 2, 4);
+        ns("(?<=(?i)ab)cd", "ABCD");
+        ns("(?<=(?i:ab))cd", "ABCD");
+        x2s("(?<!(?i)ab)cd", "aacd", 2, 4);
+        x2s("(?<!(?i:ab))cd", "aacd", 2, 4);
+        ns("(?<!(?i)ab)cd", "ABcd");
+        ns("(?<!(?i:ab))cd", "ABcd");
+
         super.test();
     }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jruby-joni.git



More information about the pkg-java-commits mailing list