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

    https://github.com/apache/nifi/pull/2929#discussion_r210089927
  
    --- Diff: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestReplaceText.java
 ---
    @@ -404,6 +404,27 @@ public void testRegexWithExpressionLanguageIsEscaped() 
throws IOException {
             out.assertContentEquals("Hello, World!");
         }
     
    +    /**
    +     * Test for NIFI-5474
    +     */
    +    @Test
    +    public void testExpressionLanguageInContentIsNotEvaluated() throws 
IOException {
    +        final TestRunner runner = getRunner();
    +        runner.setProperty(ReplaceText.SEARCH_VALUE, "${replaceKey}");
    +        runner.setProperty(ReplaceText.REPLACEMENT_VALUE, 
"${replaceValue}");
    +
    +        final Map<String, String> attributes = new HashMap<>();
    +        attributes.put("replaceKey", "Hello");
    +        attributes.put("replaceValue", "Good-bye");
    +        
runner.enqueue(Paths.get("src/test/resources/hello_with_expression_like_text.txt"),
 attributes);
    --- End diff --
    
    done, thanks


---

Reply via email to