adamdebreceni commented on code in PR #1359:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1359#discussion_r907330259


##########
extensions/standard-processors/tests/unit/ExtractTextTests.cpp:
##########
@@ -162,17 +160,34 @@ TEST_CASE("Test usage of ExtractText in regex mode", 
"[extracttextRegexTest]") {
     test_file.close();
   }
 
-  plan->runNextProcessor();  // GetFile
-  plan->runNextProcessor();  // ExtractText
-  plan->runNextProcessor();  // LogAttribute
+  SECTION("Do not include capture group 0") {
+    plan->setProperty(maprocessor, 
org::apache::nifi::minifi::processors::ExtractText::IncludeCaptureGroupZero.getName(),
 "false");
+
+    testController.runSession(plan);
+
+    std::list<std::string> suffixes = { "", ".0", ".1" };
+    for (const auto& suffix : suffixes) {
+      ss.str("");
+      ss << "key:" << "RegexAttr" << suffix << " value:" << ((suffix == ".1") 
? "80" : "130");

Review Comment:
   I see that this is old code, but we could rewrite it like you did with the 
other section, explicitly listing the expected log lines, I found this pretty 
hard to read, while the new version is more obvious IMO



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to