about summary refs log tree commit diff
path: root/stdio-common/tstscanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common/tstscanf.c')
-rw-r--r--stdio-common/tstscanf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/stdio-common/tstscanf.c b/stdio-common/tstscanf.c
index eb2f30d0f9..d0ff6c8b41 100644
--- a/stdio-common/tstscanf.c
+++ b/stdio-common/tstscanf.c
@@ -166,6 +166,12 @@ main (int argc, char **argv)
 
     if (res != 1 || a != 0)
       exit (EXIT_FAILURE);
+
+    res = sscanf ("1e3", "%lg%n", &a, &n);
+    printf ("res = %d, a = %g, n = %d\n", res, a, n);
+
+    if (res != 1 || a != 1000 || n != 3)
+      exit (EXIT_FAILURE);
   }
 
   exit(EXIT_SUCCESS);