From 863475fd5426078df5d06d9880678fab1c790222 Mon Sep 17 00:00:00 2001 From: Hristo Hristov Date: Mon, 8 Apr 2024 19:31:21 +0300 Subject: [PATCH] [libc++][format] Fixed `println.blank_line.sh.cpp` test on llvm-clang-win-x-* configurations Fix for issue: https://github.com/llvm/llvm-project/pull/87277#issuecomment-2041864530 --- .../iostream.format/print.fun/println.blank_line.sh.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 93c3563d501b2..a262c287108a4 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 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;