1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

* stdlib/strtod_l.c (____STRTOF_INTERNAL): Parse thousand

separators also if no non-zero digits found.
	* stdlib/Makefile (tests): Add tst-strtod3.
This commit is contained in:
Ulrich Drepper
2006-12-11 21:43:56 +00:00
parent f85fb97b9b
commit 1f55ce483b
6 changed files with 107 additions and 2 deletions

19
stdlib/tst-atof1.c Normal file
View File

@ -0,0 +1,19 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static int
do_test (void)
{
char buf[100];
snprintf (buf, sizeof (buf), "%g", atof ("0x10p-1"));
if (strcmp (buf, "8") != 0)
{
printf ("got \"%s\", expected \"8\"\n", buf);
return 1;
}
return 0;
}
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"