[libcxx-commits] [libcxx] [libc++][format] P3142R0: Printing Blank Lines with `println` (PR #87277)

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 4 14:34:29 PDT 2024


================
@@ -86,10 +87,11 @@ test(std::stringstream& stream, std::string expected, test_format_string<char, A
   }
   // *** println ***
   {
-    expected += '\n'; // Tested last since it changes the expected value.
+    expected += "\n\n"; // Tested last since it changes the expected value.
     stream.str("");
     ;
     std::println(stream, fmt, std::forward<Args>(args)...);
+    std::println(stream);
     std::string out = stream.str();
     TEST_REQUIRE(out == expected,
                  TEST_WRITE_CONCATENATED(
----------------
H-G-Hristov wrote:

Or we can have println_blank_line.sh.cpp?

https://github.com/llvm/llvm-project/pull/87277


More information about the libcxx-commits mailing list