summaryrefslogtreecommitdiff
path: root/stdio-common/tstscanf.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-10-04 22:50:20 +0000
committerUlrich Drepper <drepper@redhat.com>2000-10-04 22:50:20 +0000
commitd64e603ae7cd3bbede9acf62d402c9d9492d2faa (patch)
tree30157b6eec9c0ecfa1bbb77783006020561c9daa /stdio-common/tstscanf.c
parent883ba31595b0b4660756c80befc0b5fe52f42a6d (diff)
downloadglibc-d64e603ae7cd3bbede9acf62d402c9d9492d2faa.tar.gz
Update.
2000-10-04 Jakub Jelinek <jakub@redhat.com> * stdio-common/vfscanf.c (_IO_vfscanf): For [ conversion do input_error() if EOF is seen before processing. * stdio-common/tstscanf.c (main): Add testcase.
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 4732657e53..6cf5738416 100644
--- a/stdio-common/tstscanf.c
+++ b/stdio-common/tstscanf.c
@@ -46,6 +46,12 @@ main (int argc, char **argv)
result = 1;
}
+ if (sscanf ("", "%10[a-z]", buf) != EOF)
+ {
+ fputs ("test failed!\n", stdout);
+ result = 1;
+ }
+
sscanf ("conversion] Zero flag Ze]ro#\n", "%*[^]] %[^#]\n", buf);
if (strcmp (buf, "] Zero flag Ze]ro") != 0)
{