Author: pkluegl
Date: Fri Dec 21 13:56:12 2018
New Revision: 1849477

URL: http://svn.apache.org/viewvc?rev=1849477&view=rev
Log:
UIMA-5365: added test

Modified:
    
uima/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationLabelExpressionTest.java

Modified: 
uima/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationLabelExpressionTest.java
URL: 
http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationLabelExpressionTest.java?rev=1849477&r1=1849476&r2=1849477&view=diff
==============================================================================
--- 
uima/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationLabelExpressionTest.java
 (original)
+++ 
uima/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationLabelExpressionTest.java
 Fri Dec 21 13:56:12 2018
@@ -748,4 +748,20 @@ public class AnnotationLabelExpressionTe
 //    RutaTestUtils.assertAnnotationsEquals(cas, 8, 3, "a 1", "a a 1", "a a 
1");
   }
 
+  @Test
+  public void testRemoveFailedMatch() throws Exception {
+
+    String document = "a b c d";
+
+    String script = "W.begin==0{-> T1};\n";
+    script += "T1 a:ANY{REGEXP(\"c\")}->{a{-> T2};};\n";
+
+    CAS cas = RutaTestUtils.getCAS(document);
+    Ruta.apply(cas, script);
+
+    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "a");
+    RutaTestUtils.assertAnnotationsEquals(cas, 2, 0);
+
+  }
+
 }


Reply via email to