aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2001-01-15 11:17:23 +0000
committerAndreas Jaeger <aj@suse.de>2001-01-15 11:17:23 +0000
commitab9e927a7509ace416dfcc15495b4a016c8a61de (patch)
tree6d79389c0d5d1d0e838f9c4d54c6056ba6f6e6f6
parent5b6bed491f74135459517dc76bd46c2f383f16d8 (diff)
downloadglibc-ab9e927a7509ace416dfcc15495b4a016c8a61de.zip
glibc-ab9e927a7509ace416dfcc15495b4a016c8a61de.tar.gz
glibc-ab9e927a7509ace416dfcc15495b4a016c8a61de.tar.bz2
* stdio-common/tstscanf.c (main): Add two testcases for '*'
modifier.
-rw-r--r--stdio-common/tstscanf.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/stdio-common/tstscanf.c b/stdio-common/tstscanf.c
index 827f5ad..e30faa0 100644
--- a/stdio-common/tstscanf.c
+++ b/stdio-common/tstscanf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,96,97,98,99,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -305,5 +305,32 @@ main (int argc, char **argv)
}
}
+ fputs ("Test 11:\n", stdout);
+ {
+ char uart[50];
+ int res;
+
+ res = sscanf ("uart:16550A tx:0", "uart:%31s tx:%*u", uart);
+ if (res != 1)
+ {
+ fputs ("test failed!\n", stdout);
+ result = 1;
+ }
+ }
+
+ fputs ("Test 12:\n", stdout);
+ {
+ char uart[50];
+ int res;
+
+ res = sscanf ("uart:16550A", "uart:%31s tx:%*u", uart);
+ if (res != 1)
+ {
+ fputs ("test failed!\n", stdout);
+ result = 1;
+ }
+ }
+
+
return result;
}