about summary refs log tree commit diff
path: root/stdlib/tst-strtod.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/tst-strtod.c')
-rw-r--r--stdlib/tst-strtod.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/stdlib/tst-strtod.c b/stdlib/tst-strtod.c
index 3cc907f2ac..bfc2481589 100644
--- a/stdlib/tst-strtod.c
+++ b/stdlib/tst-strtod.c
@@ -47,6 +47,7 @@ static void expand __P ((char *dst, int c));
 int
 main (int argc, char ** argv)
 {
+  char buf[100];
   register const struct ltest *lt;
   char *ep;
   int status = 0;
@@ -83,6 +84,13 @@ main (int argc, char ** argv)
 	}
     }
 
+  sprintf (buf, "%f", strtod ("-0.0", NULL));
+  if (strcmp (buf, "-0.000000") != 0)
+    {
+      printf ("  strtod (\"-0.0\', NULL) returns \"%s\"\n", buf);
+      status = 1;
+    }
+
   exit (status ? EXIT_FAILURE : EXIT_SUCCESS);
 }