Github user ottobackwards commented on a diff in the pull request:

    https://github.com/apache/metron/pull/912#discussion_r164303375
  
    --- Diff: 
metron-stellar/stellar-common/src/test/java/org/apache/metron/stellar/dsl/functions/RegExFunctionsTest.java
 ---
    @@ -68,4 +68,19 @@ public void testRegExGroupVal() throws Exception {
           Assert.assertTrue("Did not fail on wrong number of 
parameters",false);
         }
       }
    +
    +  @Test
    +  public void testRegExReplace() throws Exception {
    +    final Map<String, String> variableMap = new HashMap<String, String>() 
{{
    +      put("numbers", "12345");
    +      put("numberPattern", "\\d(\\d)(\\d).*");
    +      put("letters", "abcde");
    +      put("empty", "");
    +    }};
    +
    --- End diff --
    
    Can you add tests for passing in empty or null strings?


---

Reply via email to