mattyb149 commented on a change in pull request #3825: NIFI-6782: Added 
repeat() String EL function
URL: https://github.com/apache/nifi/pull/3825#discussion_r336646954
 
 

 ##########
 File path: 
nifi-commons/nifi-expression-language/src/test/java/org/apache/nifi/attribute/expression/language/TestQuery.java
 ##########
 @@ -2079,6 +2079,34 @@ public void testPadRight() {
         verifyEmpty("${nullString:padRight(10, \"@\")}", attributes);
     }
 
+    @Test
+    public void testRepeat() {
+        final Map<String, String> attributes = new HashMap<>();
+        attributes.put("str", "abc");
+
+        verifyEquals("${not_exist:repeat(1, 2)}", attributes, "");
+        verifyEquals("${str:repeat(1, 2)}", attributes, "abc");
 
 Review comment:
   Oops meant to change that when I made the `maxRepeats` inclusive. Good 
catch, and thanks for the fix (or I can certainly do it if you prefer)!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to