Test for sscanf.
authordrepper <drepper>
Wed, 22 Aug 2001 18:38:55 +0000 (18:38 +0000)
committerdrepper <drepper>
Wed, 22 Aug 2001 18:38:55 +0000 (18:38 +0000)
libio/tst-sscanf.c [new file with mode: 0644]

diff --git a/libio/tst-sscanf.c b/libio/tst-sscanf.c
new file mode 100644 (file)
index 0000000..b1a2b84
--- /dev/null
@@ -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;
+}