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.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/stdio-common/tstscanf.c b/stdio-common/tstscanf.c
index 6db98eef31..4732657e53 100644
--- a/stdio-common/tstscanf.c
+++ b/stdio-common/tstscanf.c
@@ -277,7 +277,7 @@ main (int argc, char **argv)
     /* From PR libc/1313 reported by Ben Caradoc-Davies <bmcd@physics.otago.ac.nz>.  */
     float value;
     int res;
-    
+
     res = sscanf ("0123", "%2f", &value);
     if (res != 1 || value != 1.0)
       {
@@ -285,6 +285,19 @@ main (int argc, char **argv)
 	result = 1;
       }
   }
-  
+
+  fputs ("Test 10:\n", stdout);
+  {
+    float value;
+    int res;
+
+    res = sscanf ("--", "%f", &value);
+    if (res != 0)
+      {
+	fputs ("test failed!\n", stdout);
+	result = 1;
+      }
+  }
+
   exit (result);
 }