summary refs log tree commit diff
path: root/libio/tst-sscanf.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-08-22 18:40:06 +0000
committerUlrich Drepper <drepper@redhat.com>2001-08-22 18:40:06 +0000
commitc7509e31d1e3d3b55ddab87447b89de72b8f444c (patch)
tree3de598a55c8e0de7050fde18b0edc21f1659495b /libio/tst-sscanf.c
parentbed381426f198a1cd35cc78795ba2705d10f9580 (diff)
downloadglibc-c7509e31d1e3d3b55ddab87447b89de72b8f444c.tar.gz
glibc-c7509e31d1e3d3b55ddab87447b89de72b8f444c.tar.xz
glibc-c7509e31d1e3d3b55ddab87447b89de72b8f444c.zip
Update.
	* libio/Makefile (tests): Add tst-sscanf.
	* libio/tst-sscanf.c: New file.
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 0000000000..b1a2b8487e
--- /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;
+}