From 8dccbc62431b05789d06d48ebf83b68180c7ab58 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 27 Nov 2011 15:54:08 +0100 Subject: [PATCH] binary-io tests: Avoid test failure on mingw when libtool is used. * tests/test-binary-io.c (main): Don't remove t-bin-out2.tmp here. Don't verify the size of t-bin-out1.tmp here. * tests/test-binary-io.sh: Verify it here. Reported by Simon Josefsson. --- ChangeLog | 8 ++++++++ tests/test-binary-io.c | 9 --------- tests/test-binary-io.sh | 1 + 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index af7bcec52..ab3d043ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-11-27 Bruno Haible + + binary-io tests: Avoid test failure on mingw when libtool is used. + * tests/test-binary-io.c (main): Don't remove t-bin-out2.tmp here. + Don't verify the size of t-bin-out1.tmp here. + * tests/test-binary-io.sh: Verify it here. + Reported by Simon Josefsson. + 2011-11-26 Bruno Haible Fix conflict between two instantiations of module 'unistd'. diff --git a/tests/test-binary-io.c b/tests/test-binary-io.c index 8e5d193f6..468485ddf 100644 --- a/tests/test-binary-io.c +++ b/tests/test-binary-io.c @@ -46,19 +46,10 @@ main () exit (1); ASSERT (statbuf.st_size == 6); } - unlink ("t-bin-out2.tmp"); /* Test the SET_BINARY macro. */ SET_BINARY (1); fputs ("Hello\n", stdout); - fclose (stdout); - fclose (stderr); - { - struct stat statbuf; - if (stat ("t-bin-out1.tmp", &statbuf) < 0) - exit (1); - ASSERT (statbuf.st_size == 6); - } return 0; } diff --git a/tests/test-binary-io.sh b/tests/test-binary-io.sh index 33e128c30..272edef17 100755 --- a/tests/test-binary-io.sh +++ b/tests/test-binary-io.sh @@ -5,6 +5,7 @@ trap 'rm -fr $tmpfiles' 1 2 3 15 tmpfiles="$tmpfiles t-bin-out1.tmp t-bin-out2.tmp" ./test-binary-io${EXEEXT} > t-bin-out1.tmp || exit 1 +cmp t-bin-out1.tmp t-bin-out2.tmp > /dev/null || exit 1 rm -fr $tmpfiles -- 2.11.0