aboutsummaryrefslogtreecommitdiff
path: root/libio/tst-sscanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/tst-sscanf.c')
-rw-r--r--libio/tst-sscanf.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/libio/tst-sscanf.c b/libio/tst-sscanf.c
new file mode 100644
index 0000000..b1a2b84
--- /dev/null
+++ b/libio/tst-sscanf.c
@@ -0,0 +1,20 @@
+#include <stdio.h>
+#include <wchar.h>
+
+#define WCS_LENGTH 256
+
+int
+main (void)
+{
+ const char cnv[] ="%l[abc]";
+ const char str[] = "abbcXab";
+ wchar_t wcs[WCS_LENGTH];
+ int result = 0;
+
+ sscanf (str, cnv, wcs);
+ printf ("wcs = \"%ls\"\n", wcs);
+ fflush (stdout);
+ result = wcscmp (wcs, L"abbc") != 0;
+
+ return result;
+}