fgerlits commented on code in PR #1753: URL: https://github.com/apache/nifi-minifi-cpp/pull/1753#discussion_r1560978544
########## libminifi/test/unit/StringUtilsTests.cpp: ########## @@ -615,6 +615,16 @@ TEST_CASE("string::parseCharacter tests") { CHECK(string::parseCharacter("") == std::nullopt); } +TEST_CASE("string::replaceEscapedCharacters tests") { + CHECK(string::replaceEscapedCharacters("a") == "a"); + CHECK(string::replaceEscapedCharacters(R"(\n)") == "\n"); + CHECK(string::replaceEscapedCharacters(R"(\t)") == "\t"); + CHECK(string::replaceEscapedCharacters(R"(\r)") == "\r"); + CHECK(string::replaceEscapedCharacters(R"(\\s)") == "\\\\s"); Review Comment: I would add ```c++ CHECK(string::replaceEscapedCharacters(R"(\s)") == "\\s"); ``` (or ```c++ CHECK(string::replaceEscapedCharacters(R"(\s)") == "s"); ``` if we decide to change it) I would also add the test case ```c++ CHECK(string::replaceEscapedCharacters(R"(\\ foo \)") == "\\\\ foo \\"); ``` (or ```c++ CHECK(string::replaceEscapedCharacters(R"(\\ foo \)") == "\\ foo \\"); ``` if we decide to copy the behavior of `parseCharacter`) -- 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: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org