summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/tversion.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/tversion.c b/tests/tversion.c
index 01f755c79..8f6c072e7 100644
--- a/tests/tversion.c
+++ b/tests/tversion.c
@@ -25,6 +25,8 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
# include "config.h"
#endif
+#include <errno.h>
+
#include "mpfr-intmax.h"
#include "mpfr-test.h"
@@ -40,9 +42,17 @@ main (void)
tests_start_mpfr ();
+ errno = 0;
+
/*********************** MPFR version and patches ************************/
- printf ("[tversion] MPFR %s\n", MPFR_VERSION_STRING);
+ /* With i586-mingw32msvc-gcc -D__USE_MINGW_ANSI_STDIO and run under Wine,
+ the following line is not output. Let's try to detect the error. */
+ if (printf ("[tversion] MPFR %s\n", MPFR_VERSION_STRING) < 0)
+ {
+ perror ("tversion (first printf)");
+ err = 1;
+ }
if (strcmp (mpfr_get_patches (), "") != 0)
printf ("[tversion] MPFR patches: %s\n", mpfr_get_patches ());
@@ -409,6 +419,12 @@ main (void)
/*************************************************************************/
+ if (errno != 0)
+ {
+ perror ("tversion");
+ err = 1;
+ }
+
tests_end_mpfr ();
return err;