[libcxx-commits] [libcxx] ea2392e - [libc++][format] Fixed `println.blank_line.sh.cpp` test on llvm-clang-win-x-* configurations (#88011)

via libcxx-commits libcxx-commits at lists.llvm.org
Mon Apr 8 11:12:35 PDT 2024


Author: Hristo Hristov
Date: 2024-04-08T11:12:31-07:00
New Revision: ea2392ed33f765018002f833da9a04cd0571ab83

URL: https://github.com/llvm/llvm-project/commit/ea2392ed33f765018002f833da9a04cd0571ab83
DIFF: https://github.com/llvm/llvm-project/commit/ea2392ed33f765018002f833da9a04cd0571ab83.diff

LOG: [libc++][format] Fixed `println.blank_line.sh.cpp` test on llvm-clang-win-x-* configurations (#88011)

Fix for issue:
https://github.com/llvm/llvm-project/pull/87277#issuecomment-2041864530

The test fails on the windows to linux cross builders. The proposed
resolution is to print some text. The issue is possibly due to the
original test outputting a single `\n` character.

Added: 
    

Modified: 
    libcxx/test/std/input.output/iostream.format/print.fun/println.blank_line.sh.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/test/std/input.output/iostream.format/print.fun/println.blank_line.sh.cpp b/libcxx/test/std/input.output/iostream.format/print.fun/println.blank_line.sh.cpp
index 93c3563d501b20..a262c287108a4c 100644
--- a/libcxx/test/std/input.output/iostream.format/print.fun/println.blank_line.sh.cpp
+++ b/libcxx/test/std/input.output/iostream.format/print.fun/println.blank_line.sh.cpp
@@ -35,13 +35,15 @@
 
 // FILE_DEPENDENCIES: echo.sh
 // RUN: %{build}
-// RUN: %{exec} bash echo.sh -ne "\n" > %t.expected
+// RUN: %{exec} bash echo.sh -ne "println blank line test: \n" > %t.expected
 // RUN: %{exec} "%t.exe" > %t.actual
 // RUN: 
diff  -u %t.actual %t.expected
 
 #include <print>
 
 int main(int, char**) {
+  // On some configurations the `
diff  -u` test fails if we print a single blank line character `\n`, so we print some text first.
+  std::print("println blank line test: ");
   std::println();
 
   return 0;


        


More information about the libcxx-commits mailing list