From: Bruno Haible Date: Tue, 6 Sep 2022 13:09:41 +0000 (+0200) Subject: pipe-filter-gi tests: Fix long-standing failure on native Windows. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=6a91be2eb54be0d60d6bf068e348f47910f344e6;p=gnulib.git pipe-filter-gi tests: Fix long-standing failure on native Windows. * tests/test-pipe-filter-gi2-main.c: Include binary-io.h. (main): Avoid NL to CRLF conversion on standard output. * tests/test-pipe-filter-gi2-child.c: Include , binary-io.h. (main): Avoid NL to CRLF conversion on standard output. --- diff --git a/ChangeLog b/ChangeLog index e493278190..7f74fbea7c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2022-09-09 Bruno Haible + + pipe-filter-gi tests: Fix long-standing failure on native Windows. + * tests/test-pipe-filter-gi2-main.c: Include binary-io.h. + (main): Avoid NL to CRLF conversion on standard output. + * tests/test-pipe-filter-gi2-child.c: Include , binary-io.h. + (main): Avoid NL to CRLF conversion on standard output. + 2022-09-09 Bruno Haible posix_spawn_file_actions_addclose tests: Fix mistake from 2022-09-07. diff --git a/tests/test-pipe-filter-gi2-child.c b/tests/test-pipe-filter-gi2-child.c index 0620b5331f..e35ec2d67d 100644 --- a/tests/test-pipe-filter-gi2-child.c +++ b/tests/test-pipe-filter-gi2-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-gi2-main.c b/tests/test-pipe-filter-gi2-main.c index d772afc304..d7c2e26254 100644 --- a/tests/test-pipe-filter-gi2-main.c +++ b/tests/test-pipe-filter-gi2-main.c @@ -26,6 +26,7 @@ #include #include +#include "binary-io.h" #include "full-write.h" #include "macros.h" @@ -74,6 +75,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. */ { int rc;