From 90e2db600e03a984ee236e5bf079617e49bcdf18 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 15 Jun 2021 18:37:18 +0200 Subject: [PATCH] pipe-filter-ii tests: Fix long-standing failure on native Windows. * tests/test-pipe-filter-ii2-main.c: Include binary-io.h. (main): Avoid NL to CRLF conversion on standard output. * tests/test-pipe-filter-ii2-child.c: Include , binary-io.h. (main): Avoid NL to CRLF conversion on standard output. --- ChangeLog | 8 ++++++++ tests/test-pipe-filter-ii2-child.c | 5 +++++ tests/test-pipe-filter-ii2-main.c | 3 +++ 3 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index b192beba14..9e66bc23e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2021-06-15 Bruno Haible + + pipe-filter-ii tests: Fix long-standing failure on native Windows. + * tests/test-pipe-filter-ii2-main.c: Include binary-io.h. + (main): Avoid NL to CRLF conversion on standard output. + * tests/test-pipe-filter-ii2-child.c: Include , binary-io.h. + (main): Avoid NL to CRLF conversion on standard output. + 2021-06-15 Bruno Haible xnanosleep: Improve module description. diff --git a/tests/test-pipe-filter-ii2-child.c b/tests/test-pipe-filter-ii2-child.c index 14c9863783..2610988ad3 100644 --- a/tests/test-pipe-filter-ii2-child.c +++ b/tests/test-pipe-filter-ii2-child.c @@ -20,10 +20,15 @@ #include #include +#include + +#include "binary-io.h" int main () { + set_binary_mode (STDOUT_FILENO, O_BINARY); + /* Repeatedly: Read two integers i and j, then output all integers in the range i..j, one per line. */ for (;;) diff --git a/tests/test-pipe-filter-ii2-main.c b/tests/test-pipe-filter-ii2-main.c index 3674e01ca5..aad0505198 100644 --- a/tests/test-pipe-filter-ii2-main.c +++ b/tests/test-pipe-filter-ii2-main.c @@ -26,6 +26,7 @@ #include #include +#include "binary-io.h" #include "full-write.h" #include "macros.h" @@ -88,6 +89,8 @@ main (int argc, char **argv) ASSERT (argc == 2); + set_binary_mode (STDOUT_FILENO, O_BINARY); + /* Test writing to a nonexistent program traps sooner or later. */ { struct locals l; -- 2.39.5