about summary refs log tree commit diff
path: root/stdio-common
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-08-13 22:39:09 +0000
committerUlrich Drepper <drepper@redhat.com>1999-08-13 22:39:09 +0000
commited9c47d90b74b02e40d45b65b84027b8f2eca9c9 (patch)
treed66276611b8c1b55b8f2a04834764ab34e7d5c63 /stdio-common
parent2b80a3726a13ff418461c49c82fd968f23252e8c (diff)
downloadglibc-ed9c47d90b74b02e40d45b65b84027b8f2eca9c9.tar.gz
glibc-ed9c47d90b74b02e40d45b65b84027b8f2eca9c9.tar.xz
glibc-ed9c47d90b74b02e40d45b65b84027b8f2eca9c9.zip
Update.
1999-08-13  Ulrich Drepper  <drepper@cygnus.com>

	* stdio-common/tstscanf.c: Add test for hexadecimal float parsing
	problem.
Diffstat (limited to 'stdio-common')
-rw-r--r--stdio-common/tstscanf.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/stdio-common/tstscanf.c b/stdio-common/tstscanf.c
index 85ea70f135..4e56251e03 100644
--- a/stdio-common/tstscanf.c
+++ b/stdio-common/tstscanf.c
@@ -250,5 +250,20 @@ main (int argc, char **argv)
       }
   }
 
+  fputs ("Test 8:\n", stdout);
+  {
+    double d = 123456.789;
+    int res;
+
+    res = sscanf ("0x1234", "%lf", &d);
+    printf ("res = %d, d = %f\n", res, d);
+
+    if (res != 0 || d != 123456.789)
+      {
+	fputs ("test failed!\n", stdout);
+	result = 1;
+      }
+  }
+
   exit (result);
 }