Introduced failing test for regex in VCs
Change-Id: I36c01f3986ee7106d76172da66cd09cedfb4e64a
diff --git a/src/test/java/de/ids_mannheim/korap/query/test/collection/CollectionQueryProcessorTest.java b/src/test/java/de/ids_mannheim/korap/query/test/collection/CollectionQueryProcessorTest.java
index 04a081f..52bd4d4 100644
--- a/src/test/java/de/ids_mannheim/korap/query/test/collection/CollectionQueryProcessorTest.java
+++ b/src/test/java/de/ids_mannheim/korap/query/test/collection/CollectionQueryProcessorTest.java
@@ -126,6 +126,19 @@
assertEquals("match:eq", res.at("/collection/match").asText());
}
+ @Test
+ public void testRegexAlternative () throws JsonProcessingException, IOException {
+ collection = "textClass=/(politik|kultur)/";
+ qs.setQuery(query, ql);
+ qs.setCollection(collection);
+ res = mapper.readTree(qs.toJSON());
+ assertEquals("koral:doc", res.at("/collection/@type").asText());
+ assertEquals("textClass", res.at("/collection/key").asText());
+ assertEquals("(politik|kultur)", res.at("/collection/value").asText());
+ assertEquals("type:regex", res.at("/collection/type").asText());
+ assertEquals("match:eq", res.at("/collection/match").asText());
+ }
+
@Test